Method and device for encoding/decoding motion vector

ABSTRACT

A motion vector encoding apparatus includes: a predictor configured to obtain motion vector predictor candidates of a plurality of predetermined motion vector resolutions by using a spatial candidate block and a temporal candidate block of a current block, and to determine motion vector predictor of the current block, a motion vector of the current block, and a motion vector resolution of the current block by using the motion vector predictor candidates; and an encoder configured to encode information representing the motion vector predictor of the current block, a residual motion vector between the motion vector of the current block and the motion vector predictor of the current block, and information representing the motion vector resolution of the current block, wherein the plurality of predetermined motion vector resolutions include a resolution of a pixel unit that is greater than a resolution of one-pel unit.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation application of U.S. application Ser.No. 17/079,061, filed Oct. 23, 2020, which is to be issued on Oct. 25,2022, as U.S. Pat. No. 11,483,584, and which is a continuationapplication of U.S. application Ser. No. 16/681,177 filed on Nov. 12,2019 and which issued on Nov. 24, 2020, as U.S. Pat. No. 10,848,780,which is a continuation application of U.S. application Ser. No.15/523,180 filed on Apr. 28, 2017, which issued on Jan. 7, 2020, as U.S.Pat. No. 10,531,113, which is a National Stage Entry of InternationalApplication No. PCT/KR2015/011647 filed on Nov. 2, 2015, which claimsthe benefit of U.S. Provisional Application No. 62/073,326 filed on Oct.31, 2014, the disclosures of the above are hereby incorporated byreference herein.

TECHNICAL FIELD

The present disclosure relates to video encoding and decoding methods,and more particularly, to methods and apparatuses for encoding anddecoding a motion vector of a video image by predicting the motionvector.

BACKGROUND ART

In a codec such as H.264 advanced video coding (AVC) and high efficiencyvideo coding (HEVC), motion vectors of blocks that are previouslyencoded and adjacent to a current block or co-located blocks in apreviously encoded picture may be used for motion vector predictor ofthe current block in order to predict a motion vector of the currentblock.

In video encoding and decoding methods, in order to encode an image, onepicture may be split into macro blocks and each of the macro blocks maybe prediction encoded by using inter prediction or intra prediction.

Inter prediction is a method of compressing an image by removingtemporal redundancy among pictures, and motion estimation encoding is arepresentative example of the inter prediction. In the motion estimationencoding, each of blocks in a current picture is predicted by using atleast one reference picture. A reference block that is the most similarto the current block is searched for within a predetermined search rangeby using a predetermined evaluation function.

The current block is predicted based on the reference block, and aresidual block that is obtained by subtracting a prediction blockgenerated through the prediction from the current block is encoded.Here, in order to precisely perform the prediction, interpolation isperformed on the search range of the reference picture to generatesub-pel-unit pixels smaller than integer-pel-unit pixels, and interprediction is performed on the generated sub-pel-unit pixels.

DETAILED DESCRIPTION OF THE INVENTION Advantageous Effects

According to motion vector decoding and encoding apparatuses and methodsof the present disclosure, optimal motion vector predictor andresolution of a motion vector may be determined in order to efficientlyencode or decode video, and a complexity of an apparatus may be reduced.

It will be appreciated by one of ordinary skill in the art that that theobjectives and effects that may be achieved with the present disclosureare not limited to what has been particularly described above and otherobjectives of the present disclosure will be more clearly understoodfrom the following detailed description.

DESCRIPTION OF THE DRAWINGS

FIG. 1A is a block diagram of an apparatus for encoding a motion vector,according to an embodiment.

FIG. 1B is a flowchart of a method of encoding a motion vector,according to an embodiment.

FIG. 2A is a block diagram of an apparatus for decoding a motion vector,according to an embodiment.

FIG. 2B is a flowchart of a method of decoding a motion vector,according to an embodiment.

FIG. 3A is a diagram showing interpolation for performing motioncompensation based on various resolutions.

FIG. 3B is a diagram of motion vector resolutions in a ¼-pel unit, a½-pel unit, a one-pel unit, and a two-pel unit.

FIG. 4A is a diagram of a candidate block of a current block forobtaining motion vector predictor candidates.

FIG. 4B illustrates processes of generating motion vector predictorcandidates, according to an embodiment.

FIG. 5A is a diagram of a coding unit and a prediction unit, accordingto an embodiment.

FIG. 5B shows a part of a prediction_unit syntax according to anembodiment for transferring a motion vector resolution that has beenadaptively determined.

FIG. 5C shows a part of a prediction_unit syntax according to anotherembodiment for transferring a motion vector resolution that has beenadaptively determined.

FIG. 5D shows a part of a prediction_unit syntax according to anotherembodiment for transferring a motion vector resolution that has beenadaptively determined.

FIG. 6A is a diagram for explaining generating of a merge candidate listby using a plurality of resolutions, according to an embodiment.

FIG. 6B is a diagram for explaining generating of a merge candidate listby using a plurality of resolutions, according to another embodiment.

FIG. 7A shows pixels indicated by two motion vectors having differentresolutions.

FIG. 7B shows pixels configuring a picture expanded by four times andmotion vectors at different resolutions from one another.

FIG. 8 is a block diagram of a video encoding apparatus based on codingunits according to a tree structure, according to an embodiment of thepresent disclosure.

FIG. 9 illustrates a block diagram of a video decoding apparatus basedon coding units of a tree structure, according to an embodiment.

FIG. 10 illustrates a concept of coding units, according to anembodiment.

FIG. 11 illustrates a block diagram of a video encoder based on codingunits, according to an embodiment.

FIG. 12 illustrates a block diagram of a video decoder based on codingunits, according to an embodiment.

FIG. 13 illustrates deeper coding units according to depths, andpartitions, according to an embodiment.

FIG. 14 illustrates a relationship between a coding unit andtransformation units, according to an embodiment.

FIG. 15 illustrates a plurality of pieces of encoding information,according to an embodiment.

FIG. 16 illustrates deeper coding units according to depths, accordingto an embodiment.

FIGS. 17, 18, and 19 illustrate a relationship between coding units,prediction units, and transformation units, according to an embodiment.

FIG. 20 illustrates a relationship between a coding unit, a predictionunit, and a transformation unit, according to encoding mode informationof Table 1.

FIG. 21 illustrates a physical structure of a disc in which a program isstored, according to an embodiment.

FIG. 22 illustrates a disc drive for recording and reading a program byusing the disc.

FIG. 23 illustrates an overall structure of a content supply system forproviding a content distribution service.

FIG. 24 illustrates an external structure of a mobile phone to which thevideo encoding method and the video decoding method of the presentdisclosure are applied, according to an embodiment.

FIG. 25 illustrates an internal structure of the mobile phone.

FIG. 26 illustrates a digital broadcasting system employing acommunication system, according to an embodiment.

FIG. 27 illustrates a network structure of a cloud computing systemusing the video encoding apparatus and the video decoding apparatus,according to an embodiment.

BEST MODE

According to an aspect of the present disclosure, a motion vectorencoding apparatus includes: a predictor configured to obtain motionvector predictor candidates of a plurality of predetermined motionvector resolutions by using a spatial candidate block and a temporalcandidate block of a current block, and to determine motion vectorpredictor of the current block, a motion vector of the current block,and a motion vector resolution of the current block by using the motionvector predictor candidates; and an encoder configured to encodeinformation representing the motion vector predictor of the currentblock, a residual motion vector between the motion vector of the currentblock and the motion vector predictor of the current block, andinformation representing the motion vector resolution of the currentblock, wherein the plurality of predetermined motion vector resolutionsinclude a resolution of a pixel unit that is greater than a resolutionof one-pel unit.

The predictor may perform searching in a reference block in pixel unitsof a first motion vector resolution by using a set of first motionvector candidates including one or more motion vector predictorcandidates selected from the motion vector predictor candidates, and mayperform searching in the reference block in pixel units of a secondmotion vector resolution by using a set of second motion vectorcandidates including one or more motion vector predictor candidatesselected from the motion vector predictor candidates, wherein the firstmotion vector resolution and the second motion vector resolution may bedifferent from each other, and the set of the first motion vectorpredictor candidates and the set of the second motion vector predictorcandidates may be obtained from candidate blocks that are different fromeach other from among candidate blocks included in the spatial candidateblock and the temporal candidate block.

The predictor may perform searching in a reference block in pixel unitsof a first motion vector resolution by using a set of first motionvector candidates including one or more motion vector predictorcandidates selected from the motion vector predictor candidates, and mayperform searching in the reference block in pixel units of a secondmotion vector resolution by using a set of second motion vectorcandidates including one or more motion vector predictor candidatesselected from the motion vector predictor candidates, wherein the firstmotion vector resolution and the second motion vector resolution may bedifferent from each other, and the set of the first motion vectorpredictor candidates and the set of the second motion vector predictorcandidates may include different numbers of motion vector predictorsfrom each other.

When a pixel unit of the resolution of a motion vector of the currentblock is greater than a pixel unit of a minimum motion vectorresolution, the encoder may down-scale the residual motion vectoraccording to the resolution of the motion vector of the current block toencode the residual motion vector.

When the current block is a current block coding unit of an image, amotion vector resolution is equally determined with respect to eachcoding unit, and there is a prediction unit that is predicted in anadvanced motion vector prediction (AMVP) mode in the current codingunit, the encoder may encode the information indicating a motion vectorresolution of the prediction unit predicted in the AMVP mode asinformation representing the motion vector resolution of the currentblock.

When the current block is a current block coding unit of an image, amotion vector resolution is equally determined with respect to eachprediction unit, and there is a prediction unit that is predicted in anadvanced motion vector prediction (AMVP) mode in the current codingunit, the encoder may encode information representing a motion vectorresolution for each prediction unit predicted in the AMVP mode in thecurrent block, as information representing the motion vector resolutionof the current block.

According to an aspect of the present disclosure, a motion vectorencoding apparatus includes: a predictor configured to obtain motionvector predictor candidates of a plurality of predetermined motionvector resolutions by using a spatial candidate block and a temporalcandidate block of a current block, and to determine motion vectorpredictor of the current block, a motion vector of the current block,and a motion vector resolution of the current block by using the motionvector predictor candidates; and an encoder configured to encodeinformation representing the motion vector predictor of the currentblock, a residual motion vector between a motion vector of the currentblock and the motion vector predictor of the current block, andinformation representing the motion vector resolution of the currentblock, wherein the predictor performs searching in a reference block inpixel units of a first motion vector resolution by using a set of firstmotion vector candidates including one or more motion vector predictorcandidates selected from the motion vector predictor candidates, andperforms searching in the reference block in pixel units of a secondmotion vector resolution by using a set of second motion vectorcandidates including one or more motion vector predictor candidatesselected from the motion vector predictor candidates, wherein the firstmotion vector resolution and the second motion vector resolution aredifferent from each other, and the set of the first motion vectorpredictor candidates and the set of the second motion vector predictorcandidates are obtained from candidate blocks that are different fromeach other from among candidate blocks included in the spatial candidateblock and the temporal candidate block or include different numbers ofmotion vector predictor candidates from each other.

According to an aspect of the present disclosure, a motion vectorencoding apparatus is configured to: generate a merge candidate listincluding at least one merge candidate with respect to a current block,and determine and encode a motion vector of the current block by using amotion vector of one of the at least one merge candidate included in themerge candidate list, wherein the merge candidate list includes a motionvector obtained by down-scaling a motion vector of the at least onemerge candidate included in the merge candidate list according to aplurality of predetermined motion vector resolutions.

The down-scaling may include selecting one of peripheral pixels around apixel indicated by a motion vector of the minimum motion vectorresolution based on the resolution of the motion vector of the currentblock, instead of a pixel indicated by the motion vector of the minimummotion vector resolution, and adjusting the motion vector of the minimummotion vector resolution to indicate the selected pixel.

According to an aspect of the present disclosure, a motion vectordecoding apparatus includes: an obtainer configured to obtain motionvector predictor candidates of a plurality of predetermined motionvector resolutions by using a spatial candidate block and a temporalcandidate block of a current block, to obtain information representingmotion vector predictor of the current block from among the motionvector predictor candidates, and to obtain a residual motion vectorbetween a motion vector of the current block and the motion vectorpredictor of the current block and information representing a motionvector resolution of the current block; and a decoder configured toreconstruct the motion vector of the current block based on the residualmotion vector, the information representing the motion vector predictorof the current block, and motion vector resolution information of thecurrent block, wherein the plurality of predetermined motion vectorresolutions include a resolution of a pixel unit that is greater than aresolution of one-pel unit.

The motion vector predictor candidates of the plurality of predeterminedmotion vector resolutions may include a set of first motion vectorpredictor candidates including one or more motion vector predictorcandidates of a first motion vector resolution and a set of secondmotion vector predictor candidates including one or more motion vectorpredictor candidates of a second motion vector resolution, wherein thefirst motion vector resolution and the second motion vector resolutionmay be different from each other, and the set of the first motion vectorpredictor candidates and the set of the second motion vector predictorcandidates may be obtained from candidate blocks that are different fromeach other from among candidate blocks included in the spatial candidateblock and the temporal candidate block or include different numbers ofmotion vector predictor candidates from each other.

When a pixel unit of the resolution of the motion vector of the currentblock is greater than a pixel unit of a minimum motion vectorresolution, the decoder may up-scale the residual motion vectoraccording to the minimum motion vector resolution to reconstruct theresidual motion vector.

When the current block is a current block coding unit of an image, amotion vector resolution is equally determined with respect to eachcoding unit, and there is a prediction unit that is predicted in anadvanced motion vector prediction (AMVP) mode in the current codingunit, the obtainer may obtain information representing the motion vectorresolution of the prediction unit predicted in the AMVP mode, asinformation representing the motion vector resolution of the currentblock, from a bitstream.

According to an aspect of the present disclosure, a motion vectordecoding apparatus is configured to: generate a merge candidate listincluding at least one merge candidate with respect to a current block,and determine and decode a motion vector of the current block by using amotion vector of one of the at least one merge candidate included in themerge candidate list, wherein the merge candidate list includes a motionvector obtained by down-scaling a motion vector of the at least onemerge candidate included in the merge candidate list according to aplurality of predetermined motion vector resolutions.

According to an aspect of the present disclosure, a motion vectordecoding apparatus includes: an obtainer configured to obtain motionvector predictor candidates of a plurality of predetermined motionvector resolutions by using a spatial candidate block and a temporalcandidate block of a current block, to obtain information representingmotion vector predictor of the current block from among the motionvector predictor candidates, and to obtain a residual motion vectorbetween a motion vector of the current block and the motion vectorpredictor of the current block and information representing a motionvector resolution of the current block; and a decoder configured toreconstruct the motion vector of the current block based on the residualmotion vector, the information representing the motion vector predictorof the current block, and motion vector resolution information of thecurrent block, wherein the motion vector predictor candidates of theplurality of predetermined motion vector resolutions include a set offirst motion vector predictor candidates including one or more motionvector predictor candidates of a first motion vector resolution and aset of second motion vector predictor candidates including one or moremotion vector predictor candidates of a second motion vector resolution,wherein the first motion vector resolution and the second motion vectorresolution are different from each other, and the set of the firstmotion vector predictor candidates and the set of the second motionvector predictor candidates are obtained from candidate blocks that aredifferent from each other from among candidate blocks included in thespatial candidate block and the temporal candidate block or includedifferent numbers of motion vector predictor candidates from each other.

According to an aspect of the present disclosure, there may be provideda non-transitory computer-readable recording medium having embodiedthereon a program for executing the motion vector decoding method.

MODE OF THE INVENTION

Hereinafter, an apparatus and method for encoding and decoding a motionvector resolution for a video encoding and decoding apparatus andmethod, according to the present disclosure, will be described belowwith reference to FIGS. 1A to 7B. Hereinafter, the video encodingapparatus and method may respectively include an apparatus and methodfor encoding a motion vector that will be described later. Also, thevideo decoding apparatus and method may respectively include anapparatus and method for decoding a motion vector that will be describedlater.

Also, a video encoding technique and a video decoding technique based oncoding units having a tree structure according to an embodiment, whichmay be applied to previously suggested video encoding and decodingmethods, will be described with reference to FIGS. 8 to 20 . Inaddition, embodiments to which the previously suggested video encodingand decoding methods may be applied will be described with reference toFIGS. 21 to 27 .

Hereinafter, an “image” may refer to a still image or a moving image ofa video, or a video itself.

Hereinafter, a “sample” refers to data that is assigned to a samplinglocation of an image and is to be processed. For example, pixels in animage of a spatial domain may be samples.

Hereinafter, a “current block” may refer to a block of a coding unit ora prediction unit in a current image to be encoded or to be decoded.

Throughout the specification, when a part “includes” or “comprises” anelement, unless there is a particular description contrary thereto, thepart can further include other elements, not excluding the otherelements. The term “unit”, as used herein, means a software or hardwarecomponent, such as a Field Programmable Gate Array (FPGA) or ApplicationSpecific Integrated Circuit (ASIC), which performs certain tasks.However, the term “unit” is not limited to software or hardware. A“unit” may advantageously be configured to reside on the addressablestorage medium and configured to execute on one or more processors.Thus, a unit may include, by way of example, components, such assoftware components, object-oriented software components, classcomponents and task components, processes, functions, attributes,procedures, subroutines, segments of program code, drivers, firmware,microcode, circuitry, data, databases, data structures, tables, arrays,and variables. The functionality provided for in the components and“units” may be combined into fewer components and “units” or may befurther separated into additional components and “units”.

First, method and apparatus for encoding a motion vector in order toencode a video and method and apparatus for decoding a motion vector inorder to decode a video will be described with reference to FIGS. 1A to7B.

FIG. 1A is a block diagram of a motion vector encoding apparatus 10according to an embodiment.

In video encoding, an inter prediction denotes a prediction method usingsimilarity between a current image and other images. In a referenceimage that is reconstructed before the current image, a reference regionthat is similar to a current region in the current image is detected, adistance between the current region and the reference region on acoordinate is expressed as a motion vector, and a difference betweenpixel values of the current region and the reference region may beexpressed as residual data. Therefore, instead of directly outputtingimage information of the current region, an index indicating thereference image, a motion vector, and residual data through interprediction on the current region may be output to improve efficiency inencoding/decoding operations.

The motion vector encoding apparatus 10 according to the presentembodiment may encode a motion vector that is used to perform interprediction on blocks of each of images in a video. A type of a block maybe a square or a rectangle, or may be an arbitrary geometrical shape.The block is not limited to a data unit having a uniform size. A blockaccording to an embodiment may be, from among coding units according toa tree structure, a largest coding unit, a coding unit, a predictionunit, or a transformation unit. Video encoding and decoding methodsbased on coding units according to a tree structure will be describedbelow with reference to FIGS. 8 through 20 .

The motion vector encoding apparatus 10 may include a predictor 11 andan encoder 13.

The motion vector encoding apparatus 10 according to the presentembodiment may perform encoding of a motion vector for performing interprediction on each block of each of the images in a video.

The motion vector encoding apparatus 10 may determine a motion vector ofa current block with reference to a motion vector of a block differentfrom the current block, in order to perform motion vector prediction,prediction unit (PU) merging, or advanced motion vector prediction(AMVP).

The motion vector encoding apparatus 10 according to the presentembodiment may determine a motion vector of a current block withreference to a motion vector of another block that is temporally orspatially adjacent to the current block. The motion vector encodingapparatus 10 may determine prediction candidates including motionvectors of candidate blocks that may be targets referred to by themotion vector of the current block. The motion vector encoding apparatus10 may determine the motion vector of the current block with referenceto one motion vector selected from among the prediction candidates.

The motion vector encoding apparatus 10 according to the presentembodiment splits a coding unit into prediction units that are baseunits of prediction, searches a reference picture adjacent to a currentpicture for a prediction block that is most similar to a current codingunit through motion estimation, and determines a motion parameterrepresenting motion information between the current block and theprediction block.

A prediction unit according to the present embodiment is split from acoding unit, and may not be split as a quadtree, but may be only splitonce. For example, one coding unit may be split into a plurality ofprediction units, and a prediction unit obtained from the split may notbe additionally split.

The motion vector encoding apparatus 10 may expand a resolution of thereference picture by maximum n times (n is an integer) greater in atransverse direction and in a longitudinal direction for the motionestimation, and may determine the motion vector of the current blockwith an accuracy of 1/n in a pixel location. In this case, n is referredto as a minimum motion vector resolution of a picture.

For example, if a pixel unit of the minimum motion vector resolution is¼ pixel, the motion vector encoding apparatus 10 may expand theresolution of the picture to be four times greater in the transverse andlongitudinal directions, thereby determining a motion vector of anaccuracy of a ¼-pel location. However, it may not be sufficient todetermine the motion vector in the ¼-pel unit according tocharacteristic of an image, and on the other hand, it may be inefficientto determine the motion vector in the ¼-pel unit compared to determiningof the motion vector in a ½-pel unit. Therefore, the motion vectorencoding apparatus 10 according to the present embodiment may adaptivelydetermine a resolution of the motion vector of the current block, andmay encode determined motion vector predictor, an actual motion vector,and the motion vector resolution.

The predictor 11 according to the present embodiment may determine anoptimal motion vector for the inter prediction of the current block, byusing one of motion vector predictor candidates.

The predictor 11 obtains motion vector predictor candidates at aplurality of predetermined motion vector resolutions by using a spatialcandidate block and a temporal candidate block of the current block, andmay determine motion vector predictor of the current block, a motionvector of the current block, and a motion vector resolution of thecurrent block by using the motion vector predictor candidates. Thespatial candidate block may include at least one peripheral block thatis spatially adjacent to the current block. In addition, the temporalcandidate block may include at least one peripheral block that isspatially adjacent to a block at the same location as that of thecurrent block within the reference picture having a picture order count(POC) that is different from that of the current block. The predictor 11according to the present embodiment may determine the motion vector ofthe current block by copying, combining, or transforming at least onemotion vector predictor candidate.

The predictor 11 may determine motion vector predictor of the currentblock, a motion vector of the current block, and a motion vectorresolution of the current block by using the motion vector predictorcandidates. A plurality of predetermined motion vector resolutions mayinclude a resolution of a pixel unit that is greater than a resolutionof a one-pel unit. That is, the plurality of predetermined motion vectorresolutions may include resolutions of a two-pel unit, a three-pel unit,a four-pel unit, etc. However, the plurality of predetermined motionvector resolutions may not only include the resolution of one ormore-pel units, but also include the resolution of one or less-pelunits.

The predictor 11 may search for a reference block in a pixel unit of afirst motion vector resolution by using a set of first motion vectorpredictor candidates including one or more motion vector predictorcandidates that are selected from the motion vector predictorcandidates, and may search for a reference block in a pixel unit of asecond motion vector resolution by using a set of second motion vectorpredictor candidates including one or more motion vector predictorcandidates selected from the motion vector predictor candidates. Thefirst motion vector resolution and the second motion vector resolutionmay be different from each other. The set of the first motion vectorpredictor candidates and the set of the second motion vector predictorcandidates may be obtained from different candidate blocks from amongthe candidate blocks included in the spatial candidate block and thetemporal candidate block. The set of the first motion vector predictorcandidates and the second of the second motion vector predictorcandidates may include motion vector predictor candidates of differentnumbers.

A method for the predictor 11 to determine the motion vector predictorof the current block, the motion vector of the current block, and themotion vector resolution of the current block by using the motion vectorpredictor candidates of a plurality of predetermined motion vectorresolutions will be described later with reference to FIG. 4B.

The encoder 13 may encode information representing the motion vectorpredictor of the current block, a residual motion vector between themotion vector of the current block and the motion vector predictor ofthe current block, and information representing the motion vectorresolution of the current block. The encoder 13 may encode the motionvector of the current block by using a small number of bits because theresidual motion vector between the actual motion vector and the motionvector predictor is used, and thus, a compression rate of the videoencoding may be improved. The encoder 13 may encode an index indicatingthe motion vector resolution of the current block, as will be describedlater. Also, the encoder 13 may encode the residual motion vector afterdown-scaling the residual motion vector based on a difference between aminimum motion vector resolution and the motion vector resolution of thecurrent block.

FIG. 1B is a flowchart of a method of encoding a motion vector accordingto an embodiment.

In operation 12, the motion vector encoding apparatus 10 according tothe present embodiment may acquire motion vector predictor candidates ofa plurality of predetermined motion vector resolutions, by using themotion vectors of the spatial candidate block and the temporal candidateblock of the current block. A plurality of predetermined motion vectorresolutions may include a resolution of a pixel unit that is greaterthan a resolution of one-pel unit.

In operation 14, the motion vector encoding apparatus 10 according tothe present embodiment may determine the motion vector predictor of thecurrent block, the motion vector of the current block, and the motionvector resolution of the current block by using the motion vectorpredictor candidates acquired in operation 12.

In operation 16, the motion vector encoding apparatus 10 according tothe present embodiment may encode information representing the motionvector predictor determined in operation 14, the residual motion vectorbetween the motion vector of the current block and the motion vectorpredictor of the current block, and information representing the motionvector resolution of the current block.

FIG. 2A is a block diagram of a motion vector decoding apparatusaccording to an embodiment.

The motion vector decoding apparatus 20 may determine a motion vectorfor performing inter prediction of a current block, by parsing areceived bitstream.

An obtainer 21 may acquire motion vector predictor candidates of aplurality of predetermined motion vector resolutions by using a spatialcandidate block and a temporal candidate block of a current block. Thespatial candidate block may include at least one peripheral block thatis spatially adjacent to the current block. In addition, the temporalcandidate block may include at least one peripheral block that isspatially adjacent to a block of the same location as that of thecurrent block within the reference picture having a picture order count(POC) that is different from that of the current block. A plurality ofpredetermined motion vector resolutions may include a resolution of apixel unit that is greater than a resolution of one-pel unit. That is,the plurality of predetermined motion vector resolutions may includeresolutions of a two-pel unit, a three-pel unit, a four-pel unit, etc.However, the plurality of predetermined motion vector resolutions maynot only include the resolution of one or more pixel units, but alsoincludes the resolution of one or less pixel units.

The motion vector predictor candidates of the plurality of predeterminedmotion vector resolutions may include a set of first motion vectorpredictor candidates including one or more motion vector predictorcandidates of a first motion vector resolution and a set of secondmotion vector predictor candidates including one or more motion vectorpredictor candidates of a second motion vector resolution. The firstmotion vector resolution and the second motion vector resolution aredifferent from each other. The set of the first motion vector predictorcandidates and the set of the second motion vector predictor candidatesmay be obtained from different candidate blocks from among the candidateblocks included in the spatial candidate block and the temporalcandidate block. Also, the set of the first motion vector predictorcandidates and the second of the second motion vector predictorcandidates may include motion vector predictor candidates of differentnumbers.

The obtainer 21 may acquire, from the received bitstream, informationindicating the motion vector predictor of the current block from amongthe motion vector predictor candidates, and information about a residualmotion vector between the motion vector of the current block and themotion vector predictor of the current block and the motion vectorresolution of the current block.

A decoder 23 may reconstruct the motion vector of the current blockbased on the residual motion vector, the information indicating themotion vector predictor of the current block, and the motion vectorresolution information of the current block acquired by the obtainer 21.The decoder 23 may up-scale and reconstruct data about the receivedresidual motion vector based on a difference between the minimum motionvector resolution and the motion vector resolution of the current block.

A method for the motion vector decoding apparatus 20 according to thepresent embodiment of obtaining the motion vector resolution of thecurrent block by parsing the received bitstream will be described laterwith reference to FIGS. 5A to 5D.

FIG. 2B is a flowchart of a method of decoding a motion vector accordingto an embodiment.

In operation 22, the motion vector decoding apparatus 20 according tothe present embodiment may acquire motion vector predictor candidates ofa plurality of predetermined motion vector resolutions by using thespatial candidate block and the temporal candidate block of the currentblock.

In operation 24, the motion vector decoding apparatus 20 according tothe present embodiment may obtain, from the bitstream, informationrepresenting the motion vector predictor of the current block from amongthe motion vector predictor candidates, and information representing theresidual motion vector between the motion vector of the current blockand the motion vector predictor of the current block and the motionvector resolution of the current block. A plurality of predeterminedmotion vector resolutions may include a resolution of a pixel unit thatis greater than a resolution of one-pel unit.

In operation 26, the motion vector decoding apparatus 20 according tothe present embodiment may reconstruct the motion vector of the currentblock based on the information representing the residual motion vectorand the motion vector predictor of the current block obtained inoperation 24, and the motion vector resolution information of thecurrent block.

FIG. 3A is a diagram showing interpolation for performing motioncompensation based on various resolutions.

The motion vector encoding apparatus 10 may determine motion vector of aplurality of predetermined motion vector resolutions, for performinginter prediction on the current block. The plurality of predeterminedmotion vector resolutions may include resolutions of 2^(k)-pel unit (kis an integer). If k is greater than 0, the motion vector may indicateonly some of pixels in the reference image, and if k is less than 0,sub-pel-unit pixels are generated by an interpolation using a finiteimpulse response (FIR) filter of n-tap (n is an integer), and the motionvector may indicate the generated sub-pel-unit pixels. For example, themotion vector encoding apparatus 10 may determine the minimum motionvector resolution in a ¼-pel unit, and may determine the plurality ofpredetermined motion vector resolutions in ¼, ½, 1, and 2-pel units.

For example, sub-pels (a to l) in ½-pel units may be generated byperforming interpolation using n-tap FIR filter. When it comes to ½sub-pels in the longitudinal direction, a sub-pel a may be generatedthrough the interpolation using A1, A2, A3, A4, A5, and A6 of aninteger-pel unit, and a sub-pel b may be generated through theinterpolation using B1, B2, B3, B4, B5, and B6 of an integer-pel unit.Sub-pels c, d, e, and f may be generated in the same manner as above.

Pixel values of the sub-pels in the transverse direction may becalculated as follows. For example, a and b may be calculated asa=(A1−5×A2+20×A3+20×A4−5×A5+A6)/32 andb=(B1−5×B2+20×B3+20×B4−5×B5+B6)/32. The pixel values of the sub-pels c,d, e, and f may be calculated in the same manner as above.

Like the sub-pels in the transverse direction, sub-pels in thelongitudinal direction may be generated by an interpolation using a6-tap FIR filter. A sub-pel g may be generated by using A1, B1, C1, D1,E1, and F1, and a sub-pel h may be generated by using A2, B2, C2, D2,E2, and F2.

Pixel values of the sub-pels in the longitudinal direction may becalculated in the same manner as the calculation of the pixel values ofthe sub-pels in the transverse direction. For example, g may becalculated as g=(A1−5×B1+20×C1+20×D1−5×E1+F1)/32.

A sub-pel m in a ½-pel unit in a diagonal direction may be interpolatedby using other sub-pels in the ½-pel unit. In other words, a pixel valueof the sub-pel m may be calculated as m=(a−5×b+20×c+20×d−5×e+f)/32.

When the sub-pels in the ½-pel unit are generated, sub-pels in ¼-pelunit may be generated by using pixels of the integer-pel unit andsub-pels of the ½-pel unit. Interpolation may be performed by twoadjacent pixels to generate the sub-pels in the ¼-pel unit.Alternatively, the sub-pels in the ¼-pel unit may be generated bydirectly applying an interpolation filter to the pixel values of theinteger-pel unit, without using the sub-pel values of the ½-pel unit.

The 6-tap filter is exemplarily provided as the interpolation filter,but the motion vector encoding apparatus 10 may interpolate a picture byusing a filter having taps of different number. For example, theinterpolation filter may include 4-tap, 7-tap, 8-tap, and 12-tapfilters.

As shown in FIG. 3A, when the sub-pels in the ½-pel unit and thesub-pels in the ¼-pel unit are generated through the interpolation onthe reference picture, the interpolated reference picture and thecurrent block are compared with each other to search for a block havinga sum of absolute differences (SAD) or minimum rate-distortion cost in¼-pel units and to determine a motion vector having a ¼-pel unitresolution.

FIG. 3B is a diagram showing motion vector resolutions in ¼-pel, ½-pel,one-pel, and two-pel units in a case where a minimum motion vectorresolution is in the ¼-pel unit. FIG. 3B illustrates coordinates(represented as black squares) of pixels that may be indicated by motionvector of the resolutions in the ¼, ½, one, and two-pel units based on acoordinate (0, 0).

The motion vector encoding apparatus 10 according to the presentembodiment may search the reference picture for a block similar to thecurrent block, based on the motion vector determined at an integer pixelposition, in order to perform motion compensation in a sub-pel unit.

For example, the motion vector encoding apparatus 10 may determine themotion vector at the integer pixel position, and may increase theresolution of the reference picture by two times and search for the mostsimilar prediction block within a range of (−1, −1) to (1, 1) based onthe motion vector determined at the integer pixel position. Next, theresolution is expanded again by two times to increase the resolution byfour times, and then, the most similar prediction block is searched forwithin a range of (−1, −1) to (1, 1) based on the motion vector at the½-pel position in order to finally determine the motion vector in the¼-pel unit resolution.

For example, in a case where the motion vector at the integer pixelposition is (−4, −3) based on the coordinate (0, 0), the motion vectorin the ½-pel unit resolution becomes (−8, −6) and the motion vector inthe ½-pel unit resolution is finally determined as (−8, −7). Also, themotion vector in the ¼-pel unit resolution is changed to (−16, −14) andis moved by (−1, 0), and then, the final motion vector in the ¼-pel unitresolution may be determined to be (−17, −14).

The motion vector encoding apparatus 10 according to the presentembodiment may search the reference picture for a block similar to thecurrent block based on a pixel location greater than 1 pixel location,based on the motion vector determined at the integer pixel position inorder to perform motion compensation in a pixel unit greater than theone-pel unit. Hereinafter, a pixel location greater than the one-pellocation (e.g., 2-pel, 3-pel, and 4-pel) is referred to as a superpixel.

For example, when the motion vector at the integer pixel location is(−4, −8) based on a coordinate (0, 0), the motion vector in the two-pelunit resolution is determined to be (−2, −4). In order to encode themotion vector in the ¼-pel unit, more bits are consumed than those usedto encode the motion vector in the integer-pel unit, but precise interprediction in the ¼-pel unit may be performed, the number of bitsconsumed to encode the residual block may be reduced.

However, if the sub-pels are generated through the interpolation in apixel unit less than the ¼-pel unit, e.g., ⅛-pel unit, and if the motionvector in the ⅛-pel unit is estimated, too many bits are consumed toencode the motion vector and a compression rate of the encoding maydegrade.

Also, if there is a lot of noise in the image and if there is lesstexture, the resolution may be set in the super pixel unit and themotion estimation is performed, so that the compression rate of theencoding may be improved.

FIG. 4A is a diagram of a candidate block of a current block forobtaining motion vector predictor candidates.

The predictor 11 may acquire one or more candidates for motion vectorpredictor of the current block, in order to perform the motionestimation on the current block with respect to the reference picture ofthe current block that is to be encoded. The predictor 11 may acquire atleast one of the spatial candidate block and the temporal candidateblock of the current block, in order to obtain the candidates for themotion vector predictor.

If the current block is predicted with reference to a reference framehaving a different POC, the predictor 11 may acquire the motion vectorpredictor candidates by using blocks located around the current block, aco-located block included in a reference frame that is temporallydifferent (having different POC) from the current block, and aperipheral block of the co-located block.

For example, the spatial candidate block may include at least one of aleft block (A₁) 411, an upper block (B₁) 412, an upper-left block (B₂)413, an upper-right block (B₀) 414, and a lower-left block (A₀) 425 thatare adjacent blocks of the current block 410. The temporal candidateblock may include at least one of a co-located block 430 included in areference frame having a different POC than that of the current block,and an adjacent block (H) 431 of the co-located block 430. The motionvector encoding apparatus 10 may acquire motion vectors of the temporalcandidate block and the spatial candidate block as the motion vectorpredictor candidates.

The predictor 11 may obtain the motion vector predictor candidates of aplurality of predetermined motion vector resolutions. Each of the motionvector predictor candidates may have a resolution that is different fromthat of the others. That is, the predictor 11 may search for thereference block in a pixel unit of the first motion vector resolution byusing a first motion vector predictor candidate from among the motionvector predictor candidates, and search for the reference block in thepixel unit of the second motion vector resolution by using a secondmotion vector predictor candidate. The first motion vector predictorcandidate and the second motion vector predictor candidate may beobtained by using different blocks from each other, from among blocksincluded in the spatial candidate block and the temporal candidateblock.

The predictor 11 may determine the number and the kind of the set ofcandidate blocks (that is, a set of the motion vector predictorcandidates) varying depending on the resolution of the motion vector.

For example, in a case where the minimum motion vector resolution is¼-pel and the plurality of predetermined motion vector resolutions are¼-pel, ½-pel, 1-pel, and two-pel units, the predictor 11 may generatethe predetermined number of motion vector predictor candidates for eachof the resolutions. The motion vector predictor candidates for eachresolution may be motion vectors of different candidate blocks. Thepredictor 11 acquires the motion vector predictor candidates by usingdifferent candidate blocks for each of the resolution, thereby improvinga possibility of searching for an optical reference block and reducingrate-distortion costs, and then the encoding efficiency may be improved.

In order to determine the motion vector of the current block, thepredictor 11 may determine a search start location within the referencepicture by using each motion vector predictor candidate, and may searchfor the optimal reference block based on the resolution of each motionvector predictor candidate. That is, when the motion vector predictor ofthe current block is obtained, the motion vector encoding apparatus 10searches for the reference block in the pixel unit of a predeterminedresolution corresponding to each motion vector predictor candidate, andcompares the rate-distortion costs based on a difference value betweenthe motion vector of the current block and each motion vector predictorto determine the motion vector predictor having the minimum costs.

The coder 13 may encode information representing the residual motionvector that is a difference vector between the determined one motionvector predictor and the actual motion vector of the current block andthe motion vector resolution used to perform the inter prediction of thecurrent block.

The encoder 13 may determine and encode the residual motion vector asshown in Equation 1 below. MVx is an x component in the actual motionvector of the current block, and MVy is a y component in the actualmotion vector of the current block. pMVx is an x component in the motionvector predictor of the current block, and pMVy is a y component in themotion vector predictor of the current block. MVDx is an x component inthe residual motion vector of the current block, and MVDy is a ycomponent in the residual motion vector of the current block.MVDx=MVx−pMVxMVDy=MVy−pMVy  (1)

The decoder 23 may reconstruct the motion vector of the current block byusing the information indicating the motion vector predictor obtainedfrom the bitstream and the residual motion vector. The decoder 23 maydetermine a final motion vector by summing up the motion vectorpredictor and the residual motion vector as shown in Equation 2 below.MVx=pMVx+MVDxMVy=pMCy+MVDy  (2)

If the minimum vector resolution is the sub-pel unit, the motion vectorencoding apparatus 10 may represent the motion vector in an integervalue by multiplying the motion vector predictor and the actual motionvector by an integer value. If the motion vector predictor of the ¼-pelunit resolution starting from a coordinate (0, 0) indicates a coordinate(½, 3/2) and the minimum motion vector resolution is in the ¼-pel unit,the motion vector encoding apparatus 10 may encode a vector (2, 6) thatis obtained by multiplying the motion vector predictor by an integer 4as the motion vector predictor. If the minimum motion vector resolutionis in the ⅛-pel unit, the motion vector predictor is multiplied by aninteger 8 to obtain a vector (4, 12) and the vector (4, 12) may beencoded as the motion vector predictor.

FIG. 4B illustrates processes of generating motion vector predictorcandidates according to an embodiment.

As described above, the predictor 11 may obtain motion vector predictorcandidates of a plurality of predetermined motion vector resolutions.

For example, in a case where the minimum motion vector resolution is¼-pel and the plurality of predetermined motion vector resolutionsinclude ¼-pel, ½-pel, 1-pel, and two-pel units, the predictor 11 maygenerate the predetermined number of motion vector predictor candidatesfor each of the resolutions. The predictor 11 may generate sets 460,470, 480, and 490 of the motion vector predictor candidates to bedifferent from one another according to the plurality of predeterminedmotion vector resolutions. The sets 460, 470, 480, and 490 may includethe motion vector predictors obtained from different candidate blocksfrom one another, and may include the motion vector predictors indifferent numbers from one another. Since the predictor 11 usesdifference candidate blocks with respect to the resolutions, apossibility of searching for the optimal prediction block is improvedand the rate-distortion cost is reduced in order to improve the encodingefficiency.

The motion vector predictor candidate 460 in the ¼-pel unit resolutionmay be determined from two different temporal or spatial candidateblocks. For example, the predictor 11 obtains the motion vectors of aleft block 411 and an upper block with respect to the current block asthe motion vector predictor candidates 460 in the ¼-pel unit, and maysearch for an optimal motion vector with respect to each of the motionvector predictor candidates. That is, the predictor 11 may determine thesearch start location by using the motion vector of the left block 411of the current block, and may search the reference block in the ¼-pelunit for the optimal motion vector and the reference block. That is, thepredictor 11 may determine the search start location by using the motionvector of the upper block 412, and may search the reference block in the¼-pel unit for another optimal motion vector and the reference block.

The motion vector predictor candidate 470 in the ½-pel unit resolutionmay be determined from one temporal or spatial candidate block. Themotion vector predictor candidate in the ½-pel unit resolution may bedifferent from the motion vector predictor candidates in the ¼-pel unitresolution. For example, the predictor 11 may obtain the motion vectorof the upper-right block 414 of the current block as the motion vectorpredictor candidate 470 in the ½-pel unit. That is, the predictor 11 maydetermine the search start location by using the motion vector of theupper-right block 414, and may search the reference block in the ½-pelunit for another optimal motion vector and the reference block.

The motion vector predictor candidate 480 in the one-pel unit resolutionmay be determined from one temporal or spatial candidate block. Themotion vector predictor in the one-pel unit resolution may be differentfrom the motion vector predictors used in the ¼-pel unit resolution andthe ½-pel unit resolution. For example, the predictor 11 may determinethe motion vector of the temporal candidate block 430 as the motionvector predictor candidate 480 in the one-pel unit. That is, thepredictor 11 may determine the search start location by using the motionvector of the temporal candidate block 430, and may search the referenceblock in the one-pel unit for another optimal motion vector and thereference block.

The motion vector predictor candidate 490 in the two-pel unit resolutionmay be determined from one temporal or spatial candidate block. Themotion vector predictor in the two-pel unit resolution may be differentfrom the motion vector predictors used in the other resolutions. Forexample, the predictor 11 may determine the motion vector of thelower-left block 425 as the motion vector predictor 490 in the two-pelunit. That is, the predictor 11 may determine the search start locationby using the motion vector of the lower-left block 425, and may searchthe reference block in the two-pel unit for another optimal motionvector and the reference block.

The predictor 11 may compare the rate-distortion costs based on themotion vector of the current block and each of the motion vectorpredictors, so that the motion vector of the current block and onemotion vector predictor and one motion vector resolution 495 may befinally determined.

In a case where the pixel unit of the resolution of the motion vector inthe current block is greater than the pixel unit of the minimum motionvector resolution, the motion vector encoding apparatus 10 may encodethe residual motion vector after down-scaling the residual motion vectoraccording to the resolution of the motion vector of the current block.Also, when the pixel unit of the resolution of the motion vector in thecurrent block is greater than the pixel unit of the minimum motionvector resolution, the motion vector decoding apparatus 20 mayreconstruct the residual motion vector after up-scaling the residualmotion vector according to the minimum motion vector resolution.

In a case where the minimum motion vector resolution is in the ¼-pelunit and the motion vector resolution of the current block is determinedto be the ½-pel unit, the encoder 13 may calculate the residual motionvector by adjusting the determined actual motion vector and the motionvector predictor by the ½-pel unit in order to reduce the size of theresidual motion vector.

The encoder 13 may reduce the sizes of the actual motion vector and themotion vector predictor in halves, and may also reduce the size of theresidual motion vector in half. That is, when the minimum motion vectorresolution is in the ¼-pel unit, the motion vector predictor (MVx, MVy)that is expressed after being multiplied by 4 may be divided by 2 toexpress the motion vector predictor. For example, in a case where theminimum motion vector resolution is in the ¼-pel unit and the motionvector predictor is (−24, −16), the motion vector in the ½-pel unitresolution is (−12, −8) and the motion vector in the two-pel unitresolution is (−3, −2). Equation 3 below expresses a process of reducingthe sizes of the actual motion vector (MVx, MVy) and the motion vectorpredictor (pMVx, pMCy) into halves by using a bit shift calculation.MVDx=(MVx)>>1−(pMVx)>>1MVDy=(MVy)>>1−(pMCy)>>1  (3)

The decoder 23 may determine the final motion vector (MVx, MVy) withrespect to the current block as represented in Equation 4, by summing upthe finally determined motion vector predictor (pMVx, pMCy) and thereceived residual motion vector (MVDx, MVDy). The decoder 23 mayup-scale the obtained motion vector predictor and the residual motionvector by using the bit-shift calculation as shown in Equation 4, andmay reconstruct the motion vector with respect to the current block.MVx=(pMVx)>>1+(MVDx)>>1MVy=(pMCy)>>1+(MVDy)>>1  (4)

If the minimum motion vector resolution is in the ½^(n)-pel unit and themotion vector in a 2^(k)-pel unit resolution is determined with respectto the current block, the encoder 13 according to the present embodimentmay determine the residual motion vector by using Equation 5 below.MVDx=(MVx)>>(k+n)−(pMVx)>>(k+n)MVDy=(MVy)>>(k+n)−(pMCy)>>(k+n)  (5)

The decoder 23 may determine the final motion vector of the currentblock as shown in Equation 6 below, by summing up the finally determinedmotion vector predictor and the received residual motion vector.MVx=(pMVx)>>(k+n)+(MVDx)>>(k+n)MVy=(pMCy)>>(k+n)+(MVDy)>>(k+n)  (6)

When the size of the residual motion vector is reduced, the number ofbits representing the residual motion vector is also reduced, and thus,the encoding efficiency may be improved.

As described above with reference to FIGS. 3A and 3B, k is less than 0in the motion vector in the 2^(k)-pel unit, the reference pictureperforms interpolation in order to generate pixels at non-integerlocations. On the contrary, in a case of the motion vector, in which kis greater than 0, pixels at 2^(k) locations, not all the pixels, areonly searched for in the reference picture. Therefore, if the motionvector resolution of the current block is equal to or greater than theone-pel unit, the decoder 23 may omit the interpolation on the referencepicture according to the resolution of the motion vector in the currentblock to be decoded.

FIG. 5A is a diagram of a coding unit and a prediction unit according toan embodiment.

In a case where the current block is a current coding unit thatconfigures an image, the motion vector resolution for inter predictionis determined constantly according to the coding unit, and there are oneor more prediction units predicted in an advanced motion vectorprediction (AMVP) mode within the current coding unit, the encoder 13may encode only once information indicating the motion vector resolutionof the prediction unit that is predicted in the AMVP mode as informationindicating the motion vector resolution of the current block and maytransmit the encoded information to the motion vector decoding apparatus20. The obtainer 21 may obtain only once the information indicating themotion vector resolution of the prediction unit that is predicted in theAMVP mode, as information representing the motion vector resolution ofthe current block, from the bitstream.

FIG. 5B is a part of a prediction_unit syntax according to an embodimentfor transferring a motion vector resolution that has been adaptivelydetermined. FIG. 5B shows a syntax that defines an operation of themotion vector decoding apparatus 20 according to the present embodimentfor obtaining information representing a motion vector resolution of thecurrent block.

For example, as shown in FIG. 5A, in a case where a current coding unit560 has a size of 2N×2N and a prediction unit 563 has a size (2N×2N)equal to that of the coding unit 560 and is predicted in the AMVP mode,the encoder 13, with respect to the current coding unit 560, may onceencode information representing the motion vector resolution of thecoding unit 560, and the obtainer 21 may once obtain the informationrepresenting the motion vector resolution of the coding unit 560 fromthe bitstream.

When a current coding unit 570 has a size of 2N×2N and is split into twoprediction units 573 and 577 respectively having a size of 2N×N, sincethe prediction unit 573 is predicted in a merge mode, the encoder 13does not transfer the information representing the motion vectorresolution with respect to the prediction unit 573, and since theprediction unit 577 is predicted in the AMVP mode, the encoder 13 oncetransfers the information motion vector resolution with respect to theprediction unit 577 and the obtainer 21 may once obtain the informationrepresenting the motion vector resolution with respect to the predictionunit 577 from the bitstream. That is, the encoder 13 once transfers theinformation representing the motion vector resolution with respect tothe prediction unit 577 as the information representing the motionvector resolution of the current coding unit 570, and the decoder 23 mayreceive the information representing the motion vector resolution withrespect to the prediction unit 577 as the information representing themotion vector resolution of the current coding unit 570. The informationrepresenting the motion vector resolution may be an index type such as“cu_resolution_idx[x0][y0]” indicating one of a plurality ofpredetermined motion vectors.

Referring to the syntax shown in FIG. 5B, initial values of“parsedMVResolution(510)” that is information representing whether toextract the motion vector resolution with respect to the current codingunit and “mv_resolution_idx(512)” that is information representing themotion vector resolution of the current coding unit may be setrespectively as 0. First, the prediction unit 573 does not satisfy acondition 513 since it is predicted in the merge mode, the obtainer 21does not receive “cu_resolution_idx[x0][y0]” that is the informationrepresenting the motion vector resolution of the current predictionunit.

The prediction unit 577 satisfies the condition 513 since it ispredicted in the AMVP mode and satisfies a condition 514 since the valueof “parsedMVResolution” is 0, and the obtainer 21 may receive“cu_resolution_idx[x0][y0](516)”. Since “cu_resolution_idx[x0][y0]” isreceived, the value of “parsedMVResolution” may be set as 1 (518). Thereceived “cu_resolution_idx[x0][y0]” may be stored in“mv_resolution_idx” (520).

In a case where the current coding unit 580 has a size of 2N×2N and issplit into two prediction units 583 and 587 having a size of 2N×N, andthe prediction unit 583 and the prediction unit 587 are both predictedin the AMVP mode, the encoder 13 once encodes and transmits informationrepresenting the motion vector resolution of the current coding unit 580and the obtainer 21 may once receive the information representing themotion vector resolution of the coding unit 580 from the bitstream.

Referring to the syntax shown in FIG. 5B, the prediction unit 583satisfies the condition 513 and the value of “parsedMVResolution” is 0which satisfies the condition 514, and the obtainer 21 may obtain“cu_resolution_idx[x0][y0](516)”. Since the decoder 23 obtains“cu_resolution_idx[x0][y0]”, the value of “parsedMVResolution” may beset as 1 (518) and obtained “cu_resolution_idx[x0][y0]” may be stored in“mv_resolution_idx” (520). However, since the prediction unit 587 doesnot satisfy the condition 514 because the value of “parsedMVResolution”is 1, the obtainer 21 does not obtain “cu_resolution_idx[x0][y0](516)”.That is, since the obtainer 21 already has received the informationrepresenting the motion vector resolution of the current coding unit 580from the prediction unit 583, the obtainer 21 does not need to obtainthe information representing the motion vector resolution (equal to themotion vector resolution of the prediction unit 583) from the predictionunit 587.

In a case where the current coding unit 590 has a size of 2N×2N and issplit into two prediction units 593 and 597 having a size of 2N×N, andthe prediction unit 593 and the prediction unit 597 are both predictedin the merge mode, the condition 513 is not satisfied, and thus, theobtainer 21 does not obtain the information representing the motionvector resolution with respect to the current coding unit 590.

When a current block is a current coding unit configuring an image, amotion vector resolution for inter prediction is constantly determinedaccording to each prediction unit, and there are one or more predictionunits that are predicted in the AMVP mode in the current coding unit,the encoder 13 according to another embodiment may transmit to themotion vector decoding apparatus 20 information representing the motionvector resolution for each of the prediction units predicted in the AMVPmode in the current block as the information representing the motionvector resolution of the current block. The obtainer 21 may obtain theinformation representing the motion vector resolution of each of theprediction units in the current block, as the information representingthe motion vector resolution of the current block, from the bitstream.

FIG. 5C is a part of a prediction_unit syntax according to anotherembodiment for transferring a motion vector resolution that has beenadaptively determined. FIG. 5C shows a syntax that defines an operationof the motion vector decoding apparatus 20 according to anotherembodiment for obtaining information representing a motion vectorresolution of the current block.

The syntax of FIG. 5C is different from the syntax of FIG. 5B in thatthere is no “parsedMVResolution(510)” that represents whether the motionvector resolution is extracted with respect to the current coding unit,and the obtainer 21 may obtain information “cu_resolution_idx[x0, y0]”representing the motion vector resolution of each of the predictionunits in the current coding unit (524).

For example, referring back to FIG. 5A, in a case where a size of thecurrent coding unit 580 is 2N×2N and is split into two prediction units583 and 587 having a size of 2N×N, the prediction unit 583 and theprediction unit 587 are both predicted in the AMVP mode, and the motionvector resolution of the prediction unit 583 is in ¼-pel unit and themotion vector resolution of the prediction unit 587 is in two-pel unit,the obtainer 21 may obtain information representing two motion vectorresolutions with respect to one coding unit 580 (e.g., the motion vectorresolution ½ of the prediction unit 583 and the motion vector resolution¼ of the prediction unit 587) (524).

In a case where the motion vector resolution is determined adaptively tothe current prediction unit without regard to the prediction mode of theprediction unit, the encoder 13 according to another embodiment encodesand transmits information representing the motion vector resolution foreach of the prediction units without regard to the prediction mode, andthe obtainer 21 may obtain from the bitstream the informationrepresenting the motion vector resolution for each of the predictionunits without regard to the prediction mode.

FIG. 5D is a part of a prediction_unit syntax according to anotherembodiment for transferring a motion vector resolution that has beenadaptively determined. FIG. 5D shows a syntax that defines an operationof the motion vector decoding apparatus 20 according to anotherembodiment for obtaining information representing a motion vectorresolution of the current block.

The syntax described with reference to FIGS. 5B to 5C is under anassumption that the method of adaptively determining the motion vectorresolution is applied to only a case where the prediction mode is theAMVP mode, but FIG. 5D shows an example of the syntax under anassumption that the method of adaptively determining the motion vectorresolution is applied regardless of the prediction mode. Referring tothe syntax of FIG. 5D, the obtainer 21 may receive“cu_resolution_idx[x0][y0]” of each of the prediction units regardlessof the prediction mode of the prediction units (534).

The index “cu_resolution_idx[x0][y0]” representing the motion vectorresolution described above with reference to FIGS. 5B to 5D may beencoded in a unary or a fixed length to be transmitted. In addition,when two motion vector resolutions are only used,“cu_resolution_idx[x0][y0]” may be data in a flag form.

The motion vector encoding apparatus 10 may adaptively configure aplurality of predetermined motion vector resolutions used in encoding,in a slice or block unit. Also, the motion vector decoding apparatus 20may adaptively configure a plurality of predetermined motion vectorresolutions used in decoding, in a slice or block unit. The plurality ofpredetermined motion vector resolutions that are adaptively configuredin the slice of block unit may be referred to as a motion vectorresolution candidate group. That is, the motion vector encodingapparatus 10 and the motion vector decoding apparatus 20 may vary thekinds and the number of the motion vector candidate group of the currentblock based on information about peripheral blocks that have beenencoded or decoded.

For example, the motion vector encoding apparatus 10 or the motionvector decoding apparatus 20 may use the resolutions in the ¼-pel unit,½-pel unit, one-pel unit, and two-pel unit as the motion vectorresolution candidate group that is fixed with respect to all the images,in a case where the minimum motion vector resolution is in the ¼-pelunit. Instead of using the motion vector resolution candidate group thatis fixed with respect to all of the images, the motion vector encodingapparatus 10 or the motion vector decoding apparatus 20 may use theresolutions in the ⅛-pel unit, ¼-pel unit, and ½-pel unit as the motionvector resolution candidate group of the current block in a case wherethe peripheral block that is already encoded has a small motion vectorresolution, and may use the resolutions in the ½-pel unit, one-pel unit,and two-pel unit as the motion vector resolution candidate group of thecurrent block in a case where the peripheral block that is alreadyencoded has a large motion vector resolution. The motion vector encodingapparatus 10 or the motion vector decoding apparatus 20 may vary thekinds and the number of the motion vector resolution candidate group ina slice or block unit, based on a size of the motion vector and otherinformation.

The kinds and the number of the resolutions constituting the motionvector resolution candidate group may be constantly set and used by themotion vector encoding apparatus 10 and the motion vector decodingapparatus 20 or may be construed based on information about theperipheral block or other information in the same way. Alternatively,information about the motion vector resolution candidate group used inthe motion vector encoding apparatus 10 may be encoded as a bitstreamand clearly transmitted to the motion vector decoding apparatus 20.

FIG. 6A is a diagram of generating a merge candidate list by using aplurality of resolutions, according to an embodiment.

The motion vector encoding apparatus 10 may use a merge mode, in whichmotion information of the current block is set based on motioninformation of spatial/temporal peripheral blocks, in order to reducedata amount related to the motion information that is transmitted foreach of the prediction units. After generating identical merge candidatelists for predicting the motion information in the encoding apparatusand the decoding apparatus, the motion vector encoding apparatus 10transmits candidate selection information in the list to the decodingapparatus in order to effectively reduce the amount of data regardingthe motion information.

If the current block has a prediction unit predicted in the merge mode,the motion vector decoding apparatus 20 generates the merge candidatelist in the same manner as the motion vector encoding apparatus 10, andobtains the candidate selection information in the list from thebitstream to decode the motion vector of the current block.

The merge candidate list may include a spatial candidate based on themotion information of the spatial peripheral block and a temporalcandidate based on the motion information of the temporal peripheralblock. The motion vector encoding apparatus 10 and the motion vectordecoding apparatus 20 may allow spatial and temporal candidates of aplurality of predetermined motion vector resolutions to be included inthe merge candidate list, according to a predetermined order.

The above-described method of determining the motion vector resolutionwith reference to FIGS. 3A to 4B may not be limited to a case where theprediction unit of the current block is predicted in the AMVP mode, butmay also be applied to a case where a prediction mode, in which one ofthe motion vector predictor candidates is directly used as a finalmotion vector without transmitting a residual motion vector, (e.g., amerge mode) is used.

That is, the motion vector encoding apparatus 10 and the motion vectordecoding apparatus 20 may adjust the motion vector predictor candidatesto be suitable for a plurality of predetermined motion vectorresolutions, and may determine the adjusted motion vector predictorcandidate as the motion vector of the current block. That is, the motionvector of the candidate block included in the merge candidate list mayinclude the motion vector that is obtained by down-scaling the motion ofthe minimum motion vector resolution according to a plurality ofpredetermined motion vector resolutions. A down-scaling method will bedescribed later with reference to FIGS. 7A and 7B.

For example, it is assumed that the minimum motion vector resolution isin the ¼-pel unit, the plurality of predetermined motion vectorresolutions are in the ¼-pel, ½-pel, one-pel, and two-pel units, and themerge candidate list includes A1, B1, B0, A0, B2, and co-located blocks.The obtainer 21 of the motion vector decoding apparatus 20 configuresthe motion vector predictor candidates in the ¼-pel unit resolution, andadjusts the motion vector predictor in the ¼-pel unit resolution intothe ½-pel, one-pel, and two-pel unit resolutions to obtain the mergecandidate list of the plurality of resolutions sequentially according tothe order of resolutions.

FIG. 6B is a diagram of generating a merge candidate list by using aplurality of resolutions, according to another embodiment.

The motion vector encoding apparatus 10 and the motion vector decodingapparatus 20 configure the motion vector predictor candidates in the¼-pel unit resolution as shown in FIG. 6B, and adjust each of the motionvector predictor candidates in the ¼-pel unit resolution into the ½-pel,one-pel, and two-pel unit resolutions to obtain the merge candidate listof the plurality of resolutions sequentially according to the order ofmotion vector predictor candidates.

When the current block includes the prediction unit predicted in themerge mode, the motion vector decoding apparatus 20 may determine themotion vector with respect to the current block, based on the mergecandidate lists with respect to the plurality of resolutions obtained bythe obtainer 21 and information about the merge candidate index obtainedfrom the bitstream.

FIG. 7A shows pixels indicated by two motion vectors having differentresolutions.

In order to adjust the motion vector of high resolution into acorresponding motion vector of low resolution, the motion vectorencoding apparatus 10 may adjust the motion vector to indicateperipheral pixels instead of the pixel indicated by the motion vector ofthe high resolution. Selecting one of the peripheral pixels is referredto as rounding.

For example, in order to adjust a motion vector in the ¼-pel unitresolution indicating a coordinate (19, 27) based on a coordinate (0,0), the motion vector (19, 27) in the ¼-pel unit resolution is dividedby an integer 4, and rounding occurs during the dividing process. Forconvenience of description, it will be assumed that a motion vector ofeach resolution starts from the coordinate (0, 0) and indicates acoordinate (x, y) (x and y are integer).

Referring to FIG. 7A, the minimum motion vector resolution is in the¼-pel unit, and in order to adjust a motion vector 715 in the ¼-pel unitresolution into a motion vector in the one-pel unit resolution, fourinteger pixels 720, 730, 740, and 750 around a pixel 710 indicated bythe motion vector 715 in the ¼-pel unit resolution may be candidatepixels indicated by corresponding motion vectors 725, 735, 745, and 755in the one-pel unit resolution. That is, when a value of a coordinate ofthe pixel 710 is (19, 27), a value of a coordinate of the pixel 720 maybe (7, 24), a value of a coordinate of the pixel 730 may be (16, 28), avalue of a coordinate of the pixel 740 may be (20, 28), and a value of acoordinate of the pixel 750 may be (20, 24).

When the motion vector encoding apparatus 10 according to the presentembodiment may adjust the motion vector 710 in the ¼-pel unit resolutionto the corresponding motion vector in the one-pel unit resolution, themotion vector in the one-pel unit resolution may indicate an upper-leftinteger pixel 740. That is, when the motion vector in the ¼-pel unitresolution starts from the coordinate (0, 0) and indicates a coordinate(19, 27), a corresponding motion vector in the one-pel unit resolutionstarts from the coordinate (0, 0) and indicates a coordinate (20, 28),and the final motion vector in the one-pel unit resolution may be (5,7).

When the motion vector in the high resolution is adjusted to the motionvector in the low resolution, the motion vector encoding apparatus 10according to the present embodiment may allow the adjusted motion vectorin the low resolution to always indicate an upper-right portion of thepixel indicated by the motion vector in the high resolution. The motionvector encoding apparatus 10 according to another embodiment may allowthe adjusted motion vector in the low resolution to always indicate apixel at an upper-left portion, a lower-left portion, or a lower-rightportion of the pixel indicated by the motion vector in the highresolution.

The motion vector encoding apparatus 10 may select the pixel indicatedby the motion vector in the low resolution, from among four pixels atthe upper-left portion, the upper-right portion, the lower-left portion,and the lower-right portion around the pixel indicated by the motionvector in the high resolution, to be different according to the motionvector resolution of the current block.

For example, referring to FIG. 7B, it may be adjusted so that the motionvector in the ½-pel unit resolution may indicate an upper-left pixel1080 of a pixel 1060 indicated by the motion vector in the ¼-pel unitresolution, the motion vector in the one-pel unit resolution mayindicate an upper-right pixel 1070 of the pixel indicated by the motionvector in the ¼-pel unit resolution, and the motion vector in thetwo-pel unit resolution may indicate a lower-right pixel 1090 of thepixel indicated by the motion vector in the ¼-pel unit resolution.

The motion vector encoding apparatus 10 may determine one of theperipheral pixels to be indicated by the motion vector in the highresolution based on at least one of the resolution, the motion vectorcandidate in the ¼-pel unit resolution, information of peripheral block,encoding information, and an arbitrary pattern, instead of indicatingthe pixel previously indicated by the motion vector in the highresolution.

In addition, for convenience of description, operations of the motionvector encoding apparatus 10 are only described and operations of themotion vector decoding apparatus 20 are omitted, or operations of themotion vector decoding apparatus 20 are only described and theoperations of the motion vector encoding apparatus 10 are omitted inFIGS. 3A to 7B, but one of ordinary skill in the art would appreciatethat the motion vector encoding apparatus 10 and the motion vectordecoding apparatus 20 may perform operations corresponding respectivelyto those of the motion vector decoding apparatus 20 and the motionvector encoding apparatus 10.

Hereinafter, a video encoding method and apparatus thereof, and a videodecoding method and apparatus thereof based on coding units andtransformation units of a tree structure, according to an embodiment,will be described with reference to FIGS. 8 through 20 . The motionvector encoding apparatus 10 described above with reference to FIGS. 1Ato 7B may be included in a video encoding apparatus 800. That is, themotion vector encoding apparatus 10 may encode information representingmotion vector predictor for performing inter prediction on an image thatthe video encoding apparatus 800 is to encode, residual motion vector,and information representing a motion vector resolution by the methoddescribed above with reference to FIGS. 1A to 7B.

FIG. 8 is a block diagram of the video encoding apparatus based oncoding units according to a tree structure 800, according to anembodiment of the present disclosure.

The video encoding apparatus involving video prediction based on codingunits according to a tree structure 800 according to an embodimentincludes a coding unit determiner 820 and an output unit 830.Hereinafter, for convenience of description, the video encodingapparatus involving video prediction based on coding units according toa tree structure 800 will be abbreviated to the ‘video encodingapparatus 800’.

The coding unit determiner 820 may split a current picture based on alargest coding unit that is a coding unit having a maximum size for acurrent picture of an image. If the current picture is larger than thelargest coding unit, image data of the current picture may be split intothe at least one largest coding unit. The largest coding unit accordingto an embodiment may be a data unit having a size of 32×32, 64×64,128×128, 256×256, etc., wherein a shape of the data unit is a squarehaving a width and length in squares of 2.

A coding unit according to an embodiment may be characterized by amaximum size and a depth. The depth denotes the number of times thecoding unit is spatially split from the largest coding unit, and as thedepth deepens, deeper coding units according to depths may be split fromthe largest coding unit to a smallest coding unit. A depth of thelargest coding unit is an uppermost depth and a depth of the smallestcoding unit is a lowermost depth. Since a size of a coding unitcorresponding to each depth decreases as the depth of the largest codingunit deepens, a coding unit corresponding to an upper depth may includea plurality of coding units corresponding to lower depths.

As described above, the image data of the current picture is split intothe largest coding units according to a maximum size of the coding unit,and each of the largest coding units may include deeper coding unitsthat are split according to depths. Since the largest coding unitaccording to an embodiment is split according to depths, the image dataof a spatial domain included in the largest coding unit may behierarchically classified according to depths.

A maximum depth and a maximum size of a coding unit, which limit thetotal number of times a height and a width of the largest coding unitare hierarchically split, may be predetermined.

The coding unit determiner 820 encodes at least one split regionobtained by splitting a region of the largest coding unit according todepths, and determines a depth to output a finally encoded image dataaccording to the at least one split region. That is, the coding unitdeterminer 120 determines a final depth by encoding the image data inthe deeper coding units according to depths, according to the largestcoding unit of the current picture, and selecting a depth having theminimum encoding error. The determined final depth and image dataaccording to largest coding units are output to the output unit 830.

The image data in the largest coding unit is encoded based on the deepercoding units corresponding to at least one depth equal to or below themaximum depth, and results of encoding the image data are compared basedon each of the deeper coding units. A depth having the minimum encodingerror may be selected after comparing encoding errors of the deepercoding units. At least one final depth may be selected for each largestcoding unit.

The size of the largest coding unit is split as a coding unit ishierarchically split according to depths, and as the number of codingunits increases. Also, even if coding units correspond to the same depthin one largest coding unit, it is determined whether to split each ofthe coding units corresponding to the same depth to a lower depth bymeasuring an encoding error of the image data of the each coding unit,separately. Accordingly, even when image data is included in one largestcoding unit, encoding errors according to depths may differ according toregions in the one largest coding unit, and thus the final depths maydiffer according to regions in the image data. Thus, one or more finaldepths may be determined in one largest coding unit, and the image dataof the largest coding unit may be divided according to coding units ofat least one final depth.

Accordingly, the coding unit determiner 820 according to an embodimentmay determine coding units having a tree structure included in thelargest coding unit. The ‘coding units having a tree structure’according to an embodiment include coding units corresponding to a depthdetermined to be the final depth, from among all deeper coding unitsincluded in the largest coding unit. A coding unit of a final depth maybe hierarchically determined according to depths in the same region ofthe largest coding unit, and may be independently determined indifferent regions. Similarly, a final depth in a current region may beindependently determined from a final depth in another region.

A maximum depth according to an embodiment is an index related to thenumber of splitting times from a largest coding unit to a smallestcoding unit. A first maximum depth according to an embodiment may denotethe total number of splitting times from the largest coding unit to thesmallest coding unit. A second maximum depth according to an embodimentmay denote the total number of depth levels from the largest coding unitto the smallest coding unit. For example, when a depth of the largestcoding unit is 0, a depth of a coding unit, in which the largest codingunit is split once, may be set to 1, and a depth of a coding unit, inwhich the largest coding unit is split twice, may be set to 2. Here, ifthe smallest coding unit is a coding unit in which the largest codingunit is split four times, depth levels of depths 0, 1, 2, 3, and 4exist, and thus the first maximum depth may be set to 4, and the secondmaximum depth may be set to 5.

Prediction encoding and transformation may be performed according to thelargest coding unit. The prediction encoding and the transformation arealso performed based on the deeper coding units according to a depthequal to or depths less than the maximum depth, according to the largestcoding unit.

Since the number of deeper coding units increases whenever the largestcoding unit is split according to depths, encoding, including theprediction encoding and the transformation, is performed on all of thedeeper coding units generated as the depth deepens. For convenience ofdescription, the prediction encoding and the transformation will now bedescribed based on a coding unit of a current depth, in a largest codingunit.

The video encoding apparatus 800 according to an embodiment mayvariously select a size or shape of a data unit for encoding the imagedata. In order to encode the image data, operations, such as predictionencoding, transformation, and entropy encoding, are performed, and atthis time, the same data unit may be used for all operations ordifferent data units may be used for each operation.

For example, the video encoding apparatus 800 may select not only acoding unit for encoding the image data, but also select a data unitdifferent from the coding unit so as to perform the prediction encodingon the image data in the coding unit.

In order to perform prediction encoding in the largest coding unit, theprediction encoding may be performed based on a coding unitcorresponding to a final depth according to an embodiment, i.e., basedon a coding unit that is no longer split to coding units correspondingto a lower depth. Hereinafter, the coding unit that is no longer splitand becomes a basis unit for prediction encoding will now be referred toas a ‘prediction unit’. A partition obtained by splitting the predictionunit may include a prediction unit or a data unit obtained by splittingat least one of a height and a width of the prediction unit. A partitionis a data unit where a prediction unit of a coding unit is split, and aprediction unit may be a partition having the same size as a codingunit.

For example, when a coding unit of 2N×2N (where N is a positive integer)is no longer split and becomes a prediction unit of 2N×2N, and a size ofa partition may be 2N×2N, 2N×N, N×2N, or N×N. Examples of a partitionmode according to an embodiment may selectively include symmetricalpartitions that are obtained by symmetrically splitting a height orwidth of the prediction unit, partitions obtained by asymmetricallysplitting the height or width of the prediction unit, such as 1:n orn:1, partitions that are obtained by geometrically splitting theprediction unit, or partitions having arbitrary shapes.

A prediction mode of the prediction unit may be at least one of an intramode, an inter mode, and a skip mode. For example, the intra mode andthe inter mode may be performed on the partition of 2N×2N, 2N×N, N×2N,or N×N. Also, the skip mode may be performed only on the partition of2N×2N. The encoding may be independently performed on one predictionunit in a coding unit, so that a prediction mode having a minimumencoding error may be selected.

The video encoding apparatus 800 according to an embodiment may alsoperform the transformation on the image data in a coding unit based notonly on the coding unit for encoding the image data, but also based on adata unit that is different from the coding unit. In order to performthe transformation in the coding unit, the transformation may beperformed based on a transformation unit having a size smaller than orequal to the coding unit. For example, the transformation unit mayinclude a data unit for an intra mode and a transformation unit for aninter mode.

The transformation unit in the coding unit may be recursively split intosmaller sized regions in a manner similar to that in which the codingunit is split according to the tree structure, according to anembodiment. Thus, residual data in the coding unit may be splitaccording to the transformation unit having the tree structure accordingto transformation depths.

A transformation depth indicating the number of splitting times to reachthe transformation unit by splitting the height and width of the codingunit may also be set in the transformation unit according to anembodiment. For example, in a current coding unit of 2N×2N, atransformation depth may be 0 when the size of a transformation unit is2N×2N, may be 1 when the size of the transformation unit is N×N, and maybe 2 when the size of the transformation unit is N/2×N/2. In otherwords, the transformation unit having the tree structure may be setaccording to the transformation depths.

Split information according to depths requires not only informationabout a depth but also requires information related to prediction andtransformation. Accordingly, the coding unit determiner 820 not onlydetermines a depth having a minimum encoding error but also determines apartition mode in which a prediction unit is split to partitions, aprediction mode according to prediction units, and a size of atransformation unit for transformation.

Coding units according to a tree structure in a largest coding unit andmethods of determining a prediction unit/partition, and a transformationunit, according to embodiments, will be described in detail below withreference to FIGS. 9 through 19 .

The coding unit determiner 820 may measure an encoding error of deepercoding units according to depths by using Rate-Distortion Optimizationbased on Lagrangian multipliers.

The output unit 830 outputs, in bitstreams, the image data of thelargest coding unit, which is encoded based on the at least one depthdetermined by the coding unit determiner 820, and information accordingto depths.

The encoded image data may be obtained by encoding residual data of animage.

The split information according to depths may include depth information,partition mode information about the prediction unit, prediction modeinformation, and transformation unit split information.

Final depth information may be defined by using the split informationaccording to depths, which indicates whether encoding is performed oncoding units of a lower depth instead of a current depth. If the currentdepth of the current coding unit is a depth, the current coding unit isencoded by using the coding unit of the current depth, and thus splitinformation of the current depth may be defined not to split the currentcoding unit to a lower depth. On the contrary, if the current depth ofthe current coding unit is not the depth, the encoding has to beperformed on the coding unit of the lower depth, and thus the splitinformation of the current depth may be defined to split the currentcoding unit to the coding units of the lower depth.

If the current depth is not the depth, encoding is performed on thecoding unit that is split into the coding unit of the lower depth. Sinceat least one coding unit of the lower depth exists in one coding unit ofthe current depth, the encoding is repeatedly performed on each codingunit of the lower depth, and thus the encoding may be recursivelyperformed on the coding units having the same depth.

Since the coding units having a tree structure are determined for onelargest coding unit, and at least one piece of split information has tobe determined for a coding unit of a depth, at least one piece of splitinformation may be determined for one largest coding unit. Also, a depthof data of the largest coding unit may vary according to locations sincethe data is hierarchically split according to depths, and thus a depthand split information may be set for the data.

Accordingly, the output unit 830 according to the present embodiment mayassign encoding information about a corresponding depth and an encodingmode to at least one of the coding unit, the prediction unit, and aminimum unit included in the largest coding unit.

The minimum unit according to an embodiment is a square data unitobtained by splitting the smallest coding unit constituting thelowermost depth by 4. Alternatively, the minimum unit according to anembodiment may be a maximum square data unit that may be included in allof the coding units, prediction units, partition units, andtransformation units included in the largest coding unit.

For example, the encoding information output by the output unit 830 maybe classified into encoding information according to deeper codingunits, and encoding information according to prediction units. Theencoding information according to the deeper coding units may includethe prediction mode information and the partition size information. Theencoding information according to the prediction units may includeinformation about an estimated direction during an inter mode, about areference image index of the inter mode, about a motion vector, about achroma component of an intra mode, and about an interpolation methodduring the intra mode.

Information about a maximum size of the coding unit defined according topictures, slices, or GOPs, and information about a maximum depth may beinserted into a header of a bitstream, a sequence parameter set, or apicture parameter set.

Information about a maximum size of the transformation unit permittedwith respect to a current video, and information about a minimum size ofthe transformation unit may also be output through a header of abitstream, a sequence parameter set, or a picture parameter set. Theoutput unit 830 may encode and output reference information, predictioninformation, and slice type information that are related to prediction.

According to the simplest embodiment for the video encoding apparatus800, the deeper coding unit may be a coding unit obtained by dividing aheight or width of a coding unit of an upper depth, which is one layerabove, by two. That is, when the size of the coding unit of the currentdepth is 2N×2N, the size of the coding unit of the lower depth is N×N.Also, a current coding unit having a size of 2N×2N may maximally includefour lower-depth coding units each having a size of N×N.

Accordingly, the video encoding apparatus 800 may form the coding unitshaving the tree structure by determining coding units having an optimumshape and an optimum size for each largest coding unit, based on thesize of the largest coding unit and the maximum depth determinedconsidering characteristics of the current picture. Also, since encodingmay be performed on each largest coding unit by using any one of variousprediction modes and transformations, an optimal encoding mode may bedetermined by taking into account characteristics of the coding unit ofvarious image sizes.

Thus, if an image having a high resolution or a large data amount isencoded in a conventional macroblock, the number of macroblocks perpicture excessively increases. Accordingly, the number of pieces ofcompressed information generated for each macroblock increases, and thusit is difficult to transmit the compressed information, and datacompression efficiency decreases. However, by using the video encodingapparatus according to the present embodiment, image compressionefficiency may be increased since a coding unit is adjusted by takinginto account characteristics of an image while increasing a maximum sizeof a coding unit while considering a size of the image.

FIG. 9 is a block diagram of the video decoding apparatus based oncoding units according to a tree structure 900, according to anembodiment.

The motion vector decoding apparatus 20 described above with referenceto FIGS. 1B to 7B may be included in the video decoding apparatus 900.That is, the motion vector decoding apparatus 20 parses informationrepresenting the motion vector predictor for performing inter predictionon an image to be decoded by the video decoding apparatus 900, theresidual motion vector, and the information representing the motionvector resolution from a bitstream about encoded video, and mayreconstruct the motion vector based on the parsed information.

The video decoding apparatus involving video prediction based on codingunits of the tree structure 900 according to the present embodimentincludes a receiver 910, an image data and encoding informationextractor 920, and an image data decoder 930. Hereinafter, forconvenience of description, the video decoding apparatus involving videoprediction based on coding units of the tree structure 900 according tothe present embodiment is referred to as the ‘video decoding apparatus900’.

Definitions of various terms, such as a coding unit, a depth, aprediction unit, a transformation unit, and various types of splitinformation for decoding operations of the video decoding apparatus 900according to the present embodiment are identical to those describedwith reference to FIG. 8 and the video encoding apparatus 800.

The receiver 910 receives and parses a bitstream of an encoded video.The image data and encoding information extractor 920 extracts encodedimage data for each coding unit from the parsed bitstream, wherein thecoding units have a tree structure according to each largest codingunit, and outputs the extracted image data to the image data decoder930. The image data and encoding information extractor 920 may extractinformation about a maximum size of a coding unit of a current picture,from a header about the current picture, a sequence parameter set, or apicture parameter set.

Also, the image data and encoding information extractor 920 extracts afinal depth and split information about the coding units having a treestructure according to each largest coding unit, from the parsedbitstream. The extracted final depth and the extracted split informationare output to the image data decoder 930. That is, the image data in abitstream is split into the largest coding unit so that the image datadecoder 930 decodes the image data for each largest coding unit.

A depth and split information according to each of the largest codingunits may be set for one or more pieces of depth information, and splitinformation according to depths may include partition mode informationof a corresponding coding unit, prediction mode information, and splitinformation of a transformation unit. Also, as the depth information,the split information according to depths may be extracted.

The depth and the split information according to each of the largestcoding units extracted by the image data and encoding informationextractor 920 are a depth and split information determined to generate aminimum encoding error when an encoder, such as the video encodingapparatus 800, repeatedly performs encoding for each deeper coding unitaccording to depths according to each largest coding unit. Accordingly,the video decoding apparatus 900 may reconstruct an image by decodingdata according to an encoding method that generates the minimum encodingerror.

Since encoding information about the depth and the encoding mode may beassigned to a predetermined data unit from among a corresponding codingunit, a prediction unit, and a minimum unit, the image data and encodinginformation extractor 920 may extract the depth and the splitinformation according to the predetermined data units. If a depth andsplit information of a corresponding largest coding unit are recordedaccording to each of the predetermined data units, predetermined dataunits having the same depth and the split information may be inferred tobe the data units included in the same largest coding unit.

The image data decoder 930 reconstructs the current picture by decodingthe image data in each largest coding unit based on the depth and thesplit information according to each of the largest coding units. Thatis, the image data decoder 930 may decode the encoded image data basedon the read information about the partition mode, the prediction mode,and the transformation unit for each coding unit from among the codingunits having the tree structure included in each largest coding unit. Adecoding process may include a prediction including intra prediction andmotion compensation, and an inverse transformation.

The image data decoder 930 may perform intra prediction or motioncompensation according to a partition and a prediction mode of eachcoding unit, based on the information about the partition type and theprediction mode of the prediction unit of the coding unit according todepths.

In addition, the image data decoder 930 may read information about atransformation unit according to a tree structure for each coding unitso as to perform inverse transformation based on transformation unitsfor each coding unit, for inverse transformation for each largest codingunit. Due to the inverse transformation, a pixel value of a spatialdomain of the coding unit may be reconstructed.

The image data decoder 930 may determine a depth of a current largestcoding unit by using split information according to depths. If the splitinformation indicates that image data is no longer split in the currentdepth, the current depth is a depth. Accordingly, the image data decoder930 may decode the image data of the current largest coding unit byusing the information about the partition mode of the prediction unit,the prediction mode, and the size of the transformation unit for eachcoding unit corresponding to the current depth.

That is, data units containing the encoding information including thesame split information may be gathered by observing the encodinginformation set assigned for the predetermined data unit from among thecoding unit, the prediction unit, and the minimum unit, and the gathereddata units may be considered to be one data unit to be decoded by theimage data decoder 930 in the same encoding mode. As such, the currentcoding unit may be decoded by obtaining the information about theencoding mode for each coding unit.

FIG. 10 illustrates a concept of coding units, according to anembodiment.

A size of a coding unit may be expressed by width×height, and may be64×64, 32×32, 16×16, and 8×8. A coding unit of 64×64 may be split intopartitions of 64×64, 64×32, 32×64, or 32×32, and a coding unit of 32×32may be split into partitions of 32×32, 32×16, 16×32, or 16×16, a codingunit of 16×16 may be split into partitions of 16×16, 16×8, 8×16, or 8×8,and a coding unit of 8×8 may be split into partitions of 8×8, 8×4, 4×8,or 4×4.

In video data 1010, a resolution is 1920×1080, a maximum size of acoding unit is 64, and a maximum depth is 2. In video data 1020, aresolution is 1920×1080, a maximum size of a coding unit is 64, and amaximum depth is 3. In video data 1030, a resolution is 352×288, amaximum size of a coding unit is 16, and a maximum depth is 1. Themaximum depth shown in FIG. 10 denotes the total number of splits from alargest coding unit to a smallest coding unit.

If a resolution is high or a data amount is large, a maximum size of acoding unit may be large so as to not only increase encoding efficiencybut also to accurately reflect characteristics of an image. Accordingly,the maximum size of the coding unit of the video data 1010 and 1020having a higher resolution than the video data 1030 may be 64.

Since the maximum depth of the video data 1010 is 2, coding units 1015of the vide data 1010 may include a largest coding unit having a longaxis size of 64, and coding units having long axis sizes of 32 and 16since depths are deepened to two layers by splitting the largest codingunit twice. On the other hand, since the maximum depth of the video data1030 is 1, coding units 1035 of the video data 1030 may include alargest coding unit having a long axis size of 16, and coding unitshaving a long axis size of 8 since depths are deepened to one layer bysplitting the largest coding unit once.

Since the maximum depth of the video data 1020 is 3, coding units 1025of the video data 1020 may include a largest coding unit having a longaxis size of 64, and coding units having long axis sizes of 32, 16, and8 since the depths are deepened to 3 layers by splitting the largestcoding unit three times. As a depth deepens, an expression capabilitywith respect to detailed information may be improved.

FIG. 11 illustrates a block diagram of a video encoder 1100 based oncoding units, according to an embodiment.

The video encoder 1100 according to an embodiment performs operations ofa picture encoder 1520 (

the coding unit determiner 820?) of the video encoding apparatus 800 toencode image data. That is, an intra predictor 1120 performs intraprediction on coding units in an intra mode according to predictionunits, from among a current image 1105, and an inter predictor 1115performs inter prediction on coding units in an inter mode by using thecurrent image 1105 and a reference image obtained from a reconstructedpicture buffer 1110 according to prediction units. The current image1105 may be split into largest coding units and then the largest codingunits may be sequentially encoded. In this regard, encoding may beperformed on coding units of a tree structure which are split from thelargest coding unit.

Residue data is generated by removing prediction data regarding codingunits of each mode that is output from the intra predictor 1120 or theinter predictor 1115 from data regarding encoded coding units of thecurrent image 1105, and the residue data is output as a quantizedtransformation coefficient according to transformation units via atransformer 1125 and a quantizer 1130. The quantized transformationcoefficient is reconstructed to the residue data in a spatial domain viaan inverse-quantizer 1145 and an inverse-transformer 1150. Thereconstructed residue data in the spatial domain is added to predictiondata for coding units of each mode that is output from the intrapredictor 1120 or the inter predictor 1115 and thus is reconstructed asdata in a spatial domain for coding units of the current image 1105. Thereconstructed data in the spatial domain is generated as reconstructedimages via a de-blocker 1155 and an SAO performer 1160. Thereconstructed images are stored in the reconstructed picture buffer1110. The reconstructed images stored in the reconstructed picturebuffer 1110 may be used as reference images for inter prediction ofanother image. The transformation coefficient quantized by thetransformer 1125 and the quantizer 1130 may be output as a bitstream1140 via an entropy encoder 1135.

In order for the image encoder 1100 to be applied in the video encodingapparatus 800, all elements of the image encoder 1100, i.e., the interpredictor 1115, the intra predictor 1120, the transformer 1125, thequantizer 1130, the entropy encoder 1135, the inverse-quantizer 1145,the inverse-transformer 1150, the de-blocker 1155, and the SAO performer1160, perform operations based on each coding unit among coding unitshaving a tree structure according to each largest coding unit.

In particular, the intra predictor 1120 and the inter predictor 1115 maydetermine a partition mode and a prediction mode of each coding unitfrom among the coding units having a tree structure by taking intoaccount a maximum size and a maximum depth of a current largest codingunit, and the transformer 1125 may determine whether to split atransformation unit having a quadtree structure in each coding unit fromamong the coding units having a tree structure.

FIG. 12 illustrates a block diagram of a video decoder 1200 based oncoding units, according to an embodiment.

An entropy decoder 1215 parses decoding-target encoded image data andencoding information required for decoding from a bitstream 1205. Theencoded image data is a quantized transformation coefficient, and aninverse-quantizer 1220 and an inverse-transformer 1225 reconstructsresidue data from the quantized transformation coefficient.

An intra predictor 1240 performs intra prediction on coding units in anintra mode according to each prediction unit. An inter predictor 1235performs inter prediction on coding units in an inter mode from among acurrent image for each prediction unit by using a reference imageobtained from a reconstructed picture buffer 1230.

Prediction data and residue data regarding coding units of each modewhich passed through the intra predictor 1240 or the inter predictor1235 are summed, and thus data in a spatial domain regarding codingunits of the current image 1105 may be reconstructed, and thereconstructed data in the spatial domain may be output as areconstructed image 1260 via a deblocking unit 1245 and an SAO performer1250. Reconstructed images stored in the reconstructed picture buffer1230 may be output as reference images.

In order to decode the image data in a picture decoder 930 of the videodecoding apparatus 900, operations after the entropy decoder 1215 of theimage decoder 1200 according to an embodiment may be performed.

In order for the image decoder 1200 to be applied in the video decodingapparatus 900 according to an embodiment, all elements of the imagedecoder 1200, i.e., the entropy decoder 1215, the inverse-quantizer1220, the inverse-transformer 1225, the inter predictor 1240, the interpredictor 1235, the deblocking unit 1245, and the SAO performer 1250 mayperform operations based on coding units having a tree structure foreach largest coding unit.

In particular, the intra predictor 1240 and the inter predictor 1235 maydetermine a partition mode and a prediction mode for each of the codingunits having a tree structure, and the inverse-transformer 1225 maydetermine whether to split a transformation unit according to a quadtree structure for each of the coding units.

FIG. 13 illustrates deeper coding units according to depths, andpartitions, according to an embodiment.

The video encoding apparatus 800 and the video decoding apparatus 900use hierarchical coding units so as to consider characteristics of animage. A maximum height, a maximum width, and a maximum depth of codingunits may be adaptively determined according to the characteristics ofthe image, or may be variously set according to user requirements. Sizesof deeper coding units according to depths may be determined accordingto the predetermined maximum size of the coding unit.

In a hierarchical structure of coding units 1300 according to anembodiment, the maximum height and the maximum width of the coding unitsare each 64, and the maximum depth is 3. In this case, the maximum depthrefers to a total number of times the coding unit is split from thelargest coding unit to the smallest coding unit. Since a depth deepensalong a vertical axis of the hierarchical structure of coding units1300, a height and a width of the deeper coding unit are each split.Also, a prediction unit and partitions, which are bases for predictionencoding of each deeper coding unit, are shown along a horizontal axisof the hierarchical structure of coding units 1300.

That is, a coding unit 1310 is a largest coding unit in the hierarchicalstructure of coding units 1300, wherein a depth is 0 and a size, i.e., aheight by width, is 64×64. The depth deepens along the vertical axis,and a coding unit 1320 having a size of 32×32 and a depth of 1, a codingunit 1330 having a size of 16×16 and a depth of 2, and a coding unit1340 having a size of 8×8 and a depth of 3. The coding unit 1340 havingthe size of 8×8 and the depth of 3 is a smallest coding unit.

The prediction unit and the partitions of a coding unit are arrangedalong the horizontal axis according to each depth. That is, if thecoding unit 1310 having a size of 64×64 and a depth of 0 is a predictionunit, the prediction unit may be split into partitions included in thecoding unit 1310 having the size of 64×64, i.e. a partition 1310 havinga size of 64×64, partitions 1312 having the size of 64×32, partitions1314 having the size of 32×64, or partitions 1316 having the size of32×32.

Equally, a prediction unit of the coding unit 1320 having the size of32×32 and the depth of 1 may be split into partitions included in thecoding unit 1320 having the size of 32×32, i.e. a partition 1320 havinga size of 32×32, partitions 1322 having a size of 32×16, partitions 1324having a size of 16×32, and partitions 1326 having a size of 16×16.

Equally, a prediction unit of the coding unit 1330 having the size of16×16 and the depth of 2 may be split into partitions included in thecoding unit 1330 having the size of 16×16, i.e. a partition 1330 havinga size of 16×16 included in the coding unit 1330, partitions 1332 havinga size of 16×8, partitions 1334 having a size of 8×16, and partitions1336 having a size of 8×8.

Equally, a prediction unit of the coding unit 1340 having the size of8×8 and the depth of 3 may be split into partitions included in thecoding unit 1340 having the size of 8×8, i.e. a partition 1340 having asize of 8×8 included in the coding unit 1340, partitions 1342 having asize of 8×4, partitions 1344 having a size of 4×8, and partitions 1346having a size of 4×4.

The coding unit determiner 820 of the video encoding apparatus 800 hasto perform encoding on each of coding units of depths included in thelargest coding unit 1310 so as to determine a depth of the largestcoding unit 1310.

The number of deeper coding units according to depths including data inthe same range and the same size increases as the depth deepens. Forexample, four coding units corresponding to a depth of 2 are required tocover data that is included in one coding unit corresponding to a depthof 1. Accordingly, in order to compare encoding results of the same dataaccording to depths, the coding unit corresponding to the depth of 1 andfour coding units corresponding to the depth of 2 are each encoded.

In order to perform encoding according to each of the depths, a minimumencoding error that is a representative encoding error of acorresponding depth may be selected by performing encoding on each ofprediction units of the coding units according to depths, along thehorizontal axis of the hierarchical structure of coding units 1300.Alternatively, the minimum encoding error may be searched for bycomparing representative encoding errors according to depths, byperforming encoding for each depth as the depth deepens along thevertical axis of the hierarchical structure of coding units 1300. Adepth and a partition generating the minimum encoding error in thelargest coding unit 1310 may be selected as a depth and a partition modeof the largest coding unit 1310.

FIG. 14 illustrates a relationship between a coding unit andtransformation units, according to an embodiment.

The video encoding apparatus 800 or the video decoding apparatus 900encodes or decodes an image according to coding units having sizessmaller than or equal to a largest coding unit for each largest codingunit. Sizes of transformation units for transformation during encodingmay be selected based on data units that are not larger than acorresponding coding unit.

For example, in the video encoding apparatus 800 or the video decodingapparatus 900, when a size of the coding unit 1410 is 64×64,transformation may be performed by using the transformation units 1420having a size of 32×32.

Also, data of the coding unit 1410 having the size of 64×64 may beencoded by performing the transformation on each of the transformationunits having the size of 32×32, 16×16, 8×8, and 4×4, which are smallerthan 64×64, and then a transformation unit having the minimum codingerror with respect to an original image may be selected.

FIG. 15 illustrates a plurality of pieces of encoding information,according to an embodiment.

The output unit 830 of the video encoding apparatus 800 may encode andtransmit, as split information, partition mode information 1500,prediction mode information 1510, and transformation unit sizeinformation 1520 for each coding unit corresponding to a depth.

The partition mode information 1500 indicates information about a shapeof a partition obtained by splitting a prediction unit of a currentcoding unit, wherein the partition is a data unit for predictionencoding the current coding unit. For example, a current coding unitCU_0 having a size of 2N×2N may be split into any one of a partition1502 having a size of 2N×2N, a partition 1504 having a size of 2N×N, apartition 1506 having a size of N×2N, and a partition 1508 having a sizeof N×N. Here, the partition mode information 1500 about a current codingunit is set to indicate one of the partition 1504 having a size of 2N×N,the partition 1506 having a size of N×2N, and the partition 1508 havinga size of N×N.

The prediction mode information 1510 indicates a prediction mode of eachpartition. For example, the prediction mode information 1510 mayindicate a mode of prediction encoding performed on a partitionindicated by the partition mode information 1500, i.e., an intra mode1512, an inter mode 1514, or a skip mode 1516.

The transformation unit size information 1520 indicates a transformationunit to be based on when transformation is performed on a current codingunit. For example, the transformation unit may be a first intratransformation unit size 1522, a second intra transformation unit size1524, a first inter transformation unit size 1526, or a second intertransformation unit size 1528.

The image data and encoding information extractor 1610 of the videodecoding apparatus 900 according to an embodiment may extract and usethe partition mode information 1500, the prediction mode information1510, and the transformation unit size information 1520 for decoding,according to each deeper coding unit.

FIG. 16 illustrates deeper coding units according to depths, accordingto an embodiment.

Split information may be used to indicate a change in a depth. The spiltinformation indicates whether a coding unit of a current depth is splitinto coding units of a lower depth.

A prediction unit 1610 for prediction encoding a coding unit 1600 havinga depth of 0 and a size of 2N_0×2N_0 may include partitions of apartition mode 1612 having a size of 2N_0×2N_0, a partition mode 1614having a size of 2N_0×N_0, a partition mode 1616 having a size ofN_0×2N_0, and a partition mode 1618 having a size of N_0×N_0. Only thepartition modes 1612, 1614, 1616, and 1618 which are obtained bysymmetrically splitting the prediction unit are illustrated, but asdescribed above, a partition mode is not limited thereto and may includeasymmetrical partitions, partitions having a predetermined shape,partitions having a geometrical shape, or the like.

According to each partition mode, prediction encoding has to berepeatedly performed on one partition having a size of 2N_0×2N_0, twopartitions having a size of 2N_0×N_0, two partitions having a size ofN_0×2N_0, and four partitions having a size of N_0×N_0. The predictionencoding in an intra mode and an inter mode may be performed on thepartitions having the sizes of 2N_0×2N_0, N_0×2N_0, 2N_0×N_0, andN_0×N_0. The prediction encoding in a skip mode is performed only on thepartition having the size of 2N_0×2N_0.

If an encoding error is smallest in one of the partition modes 1612,1614, and 1616 having the sizes of 2N_0×2N_0, 2N_0×N_0 and N_0×2N_0, theprediction unit 1610 may not be split into a lower depth.

If the encoding error is the smallest in the partition mode 1618 havingthe size of N_0×N_0, a depth is changed from 0 to 1 and split isperformed (operation 1620), and encoding may be repeatedly performed oncoding units 1630 of a partition mode having a depth of 2 and a size ofN_0×N_0 so as to search for a minimum encoding error.

A prediction unit 1640 for prediction encoding the coding unit 1630having a depth of 1 and a size of 2N_1×2N_1 (=N_0×N_0) may include apartition mode 1642 having a size of 2N_1×2N_1, a partition mode 1644having a size of 2N_1×N_1, a partition mode 1646 having a size ofN_1×2N_1, and a partition mode 1648 having a size of N_1×N_1.

If an encoding error is the smallest in the partition mode 1648 havingthe size of N_1×N_1, a depth is changed from 1 to 2 and split isperformed (in operation 1650), and encoding may be repeatedly performedon coding units 1660 having a depth of 2 and a size of N_2×N_2 so as tosearch for a minimum encoding error.

When a maximum depth is d, deeper coding units according to depths maybe set until when a depth corresponds to d-1, and split information maybe set until when a depth corresponds to d-2. In other words, whenencoding is performed up to when the depth is d-1 after a coding unitcorresponding to a depth of d-2 is split (in operation 1670), aprediction unit 1690 for prediction encoding a coding unit 1680 having adepth of d-1 and a size of 2N_(d-1)×2N_(d-1) may include partitions of apartition mode 1692 having a size of 2N_(d-1)×2N_(d-1), a partition mode1694 having a size of 2N_(d-1)×N_(d-1), a partition mode 1696 having asize of N_(d-1)×2N_(d-1), and a partition mode 1698 having a size ofN_(d-1)×N_(d-1).

Prediction encoding may be repeatedly performed on one partition havinga size of 2N_(d-1)×2N_(d-1), two partitions having a size of2N_(d-1)×N_(d-1), two partitions having a size of N_(d-1)×2N_(d-1), fourpartitions having a size of N_(d-1)×N_(d-1) from among the partitionmodes so as to search for a partition mode having a minimum encodingerror.

Even when the partition type 1698 having the size of N_(d-1)×N_(d-1) hasthe minimum encoding error, since a maximum depth is d, a coding unitCU_(d-1) having a depth of d-1 is no longer split into a lower depth,and a depth for the coding units constituting a current largest codingunit 1600 is determined to be d-1 and a partition mode of the currentlargest coding unit 1600 may be determined to be N_(d-1)×N_(d-1). Also,since the maximum depth is d, split information for the coding unit 1652corresponding to a depth of d-1 is not set.

A data unit 1699 may be a ‘minimum unit’ for the current largest codingunit. A minimum unit according to the present embodiment may be a squaredata unit obtained by splitting a smallest coding unit having alowermost depth by 4. By performing the encoding repeatedly, the videoencoding apparatus 800 according to the present embodiment may select adepth having the minimum encoding error by comparing encoding errorsaccording to depths of the coding unit 1600 to determine a depth, andset a corresponding partition type and a prediction mode as an encodingmode of the depth.

As such, the minimum encoding errors according to depths are compared inall of the depths of 0, 1, . . . , d-1, d, and a depth having theminimum encoding error may be determined as a depth. The depth, thepartition mode of the prediction unit, and the prediction mode may beencoded and transmitted as split information. Also, since a coding unithas to be split from a depth of 0 to a depth, only split information ofthe depth is set to ‘0’, and split information of depths excluding thedepth is set to ‘1’.

The image data and encoding information extractor 920 of the videodecoding apparatus 900 according to the present embodiment may extractand use a depth and prediction unit information about the coding unit1600 so as to decode the coding unit 1612. The video decoding apparatus900 according to the present embodiment may determine a depth, in whichsplit information is ‘0’, as a depth by using split informationaccording to depths, and may use, for decoding, split information aboutthe corresponding depth.

FIGS. 17, 18, and 19 illustrate a relationship between coding units,prediction units, and transformation units, according to an embodiment.

Coding units 1710 are deeper coding units according to depths determinedby the video encoding apparatus 800, in a largest coding unit.Prediction units 1760 are partitions of prediction units of each of thecoding units 1710 according to depths, and transformation units 1770 aretransformation units of each of the coding units according to depths.

When a depth of a largest coding unit is 0 in the deeper coding units1710, depths of coding units 1712 and 1754 are 1, depths of coding units1714, 1716, 1718, 1728, 1750, and 1752 are 2, depths of coding units1720, 1722, 1724, 1726, 1730, 1732, and 1748 are 3, and depths of codingunits 1740, 1742, 1744, and 1746 are 4.

Some partitions 1714, 1716, 1722, 1732, 1748, 1750, 1752, and 1754 fromamong the prediction units 1760 are obtained by splitting the codingunit. That is, partitions 1714, 1722, 1750, and 1754 are a partitionmode having a size of 2N×N, partitions 1716, 1748, and 1752 are apartition mode having a size of N×2N, and a partition 1732 is apartition mode having a size of N×N. Prediction units and partitions ofthe deeper coding units 1710 are smaller than or equal to each codingunit.

Transformation or inverse transformation is performed on image data ofthe coding unit 1752 in the transformation units 1770 in a data unitthat is smaller than the coding unit 1752. Also, the coding units 1714,1716, 1722, 1732, 1748, 1750, 1752, and 1754 in the transformation units1760 are data units different from those in the prediction units 1760 interms of sizes and shapes. That is, the video encoding apparatus 800 andthe video decoding apparatus 900 according to embodiments may performintra prediction/motion estimation/motion compensation/andtransformation/inverse transformation on an individual data unit in thesame coding unit.

Accordingly, encoding is recursively performed on each of coding unitshaving a hierarchical structure in each region of a largest coding unitto determine an optimum coding unit, and thus coding units having arecursive tree structure may be obtained. Encoding information mayinclude split information about a coding unit, partition modeinformation, prediction mode information, and transformation unit sizeinformation. Table 1 below shows an example of the encoding informationthat may be set by the video encoding apparatus 800 and the videodecoding apparatus 900 according to embodiments.

TABLE 1 Split Information 0 (Encoding on Coding Unit having Size of 2N ×2N and Current Depth of d) Partition Type Size of Transformation UnitSymmetrical Asymmetrical Split Split Prediction Partition PartitionInformation 0 of Information 1 of Split Mode Type Type TransformationUnit Transformation Unit Information 1 Intra 2N × 2N 2N × nU 2N × 2N N ×N Repeatedly Inter 2N × N  2N × nD (Symmetrical Encode Skip  N × 2N  nL× 2N Partition Type) Coding Units (Only N × N nR × 2N N/2 × N/2 havingLower 2N × 2N) (Asymmetrical Depth of d + 1 Partition Type)

The output unit 830 of the video encoding apparatus 800 according to thepresent embodiment may output the encoding information about the codingunits having a tree structure, and the image data and encodinginformation extractor 920 of the video decoding apparatus 900 accordingto the present embodiment may extract the encoding information about thecoding units having a tree structure from a received bitstream.

Split information specifies whether a current coding unit is split intocoding units of a lower depth. If split information of a current depth dis 0, a depth, in which a current coding unit is no longer split into alower depth, is a depth, and thus partition mode information, predictionmode information, and transformation unit size information may bedefined for the depth. If the current coding unit is further splitaccording to the split information, encoding has to be independentlyperformed on four split coding units of a lower depth.

A prediction mode may be one of an intra mode, an inter mode, and a skipmode. The intra mode and the inter mode may be defined in all partitionmodes, and the skip mode is defined only in a partition mode having asize of 2N×2N.

The partition mode information may indicate symmetrical partition modeshaving sizes of 2N×2N, 2N×N, N×2N, and N×N, which are obtained bysymmetrically splitting a height or a width of a prediction unit, andasymmetrical partition modes having sizes of 2N×nU, 2N×nD, nL×2N, andnR×2N, which are obtained by asymmetrically splitting the height orwidth of the prediction unit. The asymmetrical partition modes havingthe sizes of 2N×nU and 2N×nD may be respectively obtained by splittingthe height of the prediction unit in 1:3 and 3:1, and the asymmetricalpartition modes having the sizes of nL×2N and nR×2N may be respectivelyobtained by splitting the width of the prediction unit in 1:3 and 3:1.

The size of the transformation unit may be set to be two types in theintra mode and two types in the inter mode. That is, if splitinformation of the transformation unit is 0, the size of thetransformation unit may be 2N×2N, which is the size of the currentcoding unit. If split information of the transformation unit is 1, thetransformation units may be obtained by splitting the current codingunit. Also, if a partition mode of the current coding unit having thesize of 2N×2N is a symmetrical partition mode, a size of atransformation unit may be N×N, and if the partition mode of the currentcoding unit is an asymmetrical partition mode, the size of thetransformation unit may be N/2×N/2.

The encoding information about coding units having a tree structureaccording to the present embodiment may be assigned to at least one of acoding unit corresponding to a depth, a prediction unit, and a minimumunit. The coding unit corresponding to the depth may include at leastone of a prediction unit and a minimum unit containing the same encodinginformation.

Accordingly, it is determined whether adjacent data units are includedin the same coding unit corresponding to the depth by comparing encodinginformation of the adjacent data units. Also, a corresponding codingunit corresponding to a depth is determined by using encodinginformation of a data unit, and thus a distribution of depths in alargest coding unit may be inferred.

Accordingly, if a current coding unit is predicted based on encodinginformation of adjacent data units, encoding information of data unitsin deeper coding units adjacent to the current coding unit may bedirectly referred to and used.

In another embodiment, if a current coding unit is predicted based onencoding information of adjacent data units, data units adjacent to thecurrent coding unit may be searched by using encoded information of thedata units, and the searched adjacent coding units may be referred forpredicting the current coding unit.

FIG. 20 illustrates a relationship between a coding unit, a predictionunit, and a transformation unit, according to encoding mode informationof Table 1.

A largest coding unit 2000 includes coding units 2002, 2004, 2006, 2012,2014, 2016, and 2018 of depths. Here, since the coding unit 2018 is acoding unit of a depth, split information may be set to 0. Partitionmode information of the coding unit 2018 having a size of 2N×2N may beset to be one of partition modes including 2N×2N 2022, 2N×N 2024, N×2N2026, N×N 2028, 2N×nU 2032, 2N×nD 2034, nL×2N 2036, and nR×2N 2038.

Transformation unit split information (TU size flag) is a type of atransformation index, and a size of a transformation unit correspondingto the transformation index may be changed according to a predictionunit type or partition mode of the coding unit.

For example, when the partition mode information is set to be one ofsymmetrical partition modes 2N×2N 2022, 2N×N 2024, N×2N 2026, and N×N2028, if the transformation unit split information is 0, atransformation unit 2042 having a size of 2N×2N is set, and if thetransformation unit split information is 1, a transformation unit 2044having a size of N×N may be set.

When the partition mode information is set to be one of asymmetricalpartition modes 2N×nU 2032, 2N×nD 2034, nL×2N 2036, and nR×2N 2038, ifthe transformation unit split information (TU size flag) is 0, atransformation unit 2052 having a size of 2N×2N may be set, and if thetransformation unit split information is 1, a transformation unit 2054having a size of N/2×N/2 may be set.

The transformation unit split information (TU size flag) described abovewith reference to FIG. 19 is a flag having a value of 0 or 1, but thetransformation unit split information according to an embodiment is notlimited to a flag having 1 bit, and the transformation unit may behierarchically split while the transformation unit split informationincreases in a manner of 0, 1, 2, 3 . . . etc., according to setting.The transformation unit split information may be an example of thetransformation index.

In this case, the size of a transformation unit that has been actuallyused may be expressed by using the transformation unit split informationaccording to the present embodiment, together with a maximum size of thetransformation unit and a minimum size of the transformation unit. Thevideo encoding apparatus 800 according to the present embodiment mayencode maximum transformation unit size information, minimumtransformation unit size information, and maximum transformation unitsplit information. The result of encoding the maximum transformationunit size information, the minimum transformation unit size information,and the maximum transformation unit split information may be insertedinto an SPS. The video decoding apparatus 900 according to the presentembodiment may decode video by using the maximum transformation unitsize information, the minimum transformation unit size information, andthe maximum transformation unit split information.

For example, (a) if the size of a current coding unit is 64×64 and amaximum transformation unit size is 32×32, (a-1) then the size of atransformation unit may be 32×32 when a TU size flag is 0, (a-2) may be16×16 when the TU size flag is 1, and (a-3) may be 8×8 when the TU sizeflag is 2.

As another example, (b) if the size of the current coding unit is 32×32and a minimum transformation unit size is 32×32, (b-1) then the size ofthe transformation unit may be 32×32 when the TU size flag is 0. Here,the TU size flag cannot be set to a value other than 0, since the sizeof the transformation unit cannot be less than 32×32.

As another example, (c) if the size of the current coding unit is 64×64and a maximum TU size flag is 1, then the TU size flag may be 0 or 1.Here, the TU size flag cannot be set to a value other than 0 or 1.

Thus, if it is defined that the maximum TU size flag is‘MaxTransformSizeIndex’, a minimum transformation unit size is‘MinTransformSize’, and a transformation unit size is ‘RootTuSize’ whenthe TU size flag is 0, then a current minimum transformation unit size‘CurrMinTuSize’ that can be determined in a current coding unit may bedefined by Equation (1):CurrMinTuSize=max(MinTransformSize,RootTuSize/(2{circumflex over( )}MaxTransformSizeIndex))  (1)

Compared to the current minimum transformation unit size ‘CurrMinTuSize’that can be determined in the current coding unit, a transformation unitsize ‘RootTuSize’ when the TU size flag is 0 may denote a maximumtransformation unit size that can be selected in the system.‘RootTuSize/(2{circumflex over ( )}MaxTransformSizeIndex)’ denotes atransformation unit size when the transformation unit size ‘RootTuSize’,when the TU size flag is 0, is split by the number of timescorresponding to the maximum TU size flag, and ‘MinTransformSize’denotes a minimum transformation size. Thus, a smaller value from among‘RootTuSize/(2{circumflex over ( )}MaxTransformSizeIndex)’ and‘MinTransformSize’ may be the current minimum transformation unit size‘CurrMinTuSize’ that can be determined in the current coding unit.

According to an embodiment, the maximum transformation unit sizeRootTuSize may vary according to the type of a prediction mode.

For example, if a current prediction mode is an inter mode, then‘RootTuSize’ may be determined by using Equation (2) below. In Equation(2), ‘MaxTransformSize’ denotes a maximum transformation unit size, and‘PUSize’ denotes a current prediction unit size.RootTuSize=min(MaxTransformSize,PUSize)  (2)

That is, if the current prediction mode is the inter mode, thetransformation unit size ‘RootTuSize’, when the TU size flag is 0, maybe a smaller value from among the maximum transformation unit size andthe current prediction unit size.

If a prediction mode of a current partition unit is an intra mode,‘RootTuSize’ may be determined by using Equation (3) below. In Equation(3), ‘PartitionSize’ denotes the size of the current partition unit.RootTuSize=min(MaxTransformSize,PartitionSize)  (3)

That is, if the current prediction mode is the intra mode, thetransformation unit size ‘RootTuSize’ when the TU size flag is 0 may bea smaller value from among the maximum transformation unit size and thesize of the current partition unit.

However, the current maximum transformation unit size ‘RootTuSize’ thatvaries according to the type of a prediction mode in a partition unit isjust an embodiment, and a factor for determining the current maximumtransformation unit size is not limited thereto.

According to the video encoding method based on coding units of a treestructure described above with reference to FIGS. 8 through 20 , imagedata of a spatial domain is encoded in each of the coding units of thetree structure, and the image data of the spatial domain isreconstructed in a manner that decoding is performed on each largestcoding unit according to the video decoding method based on the codingunits of the tree structure, so that a video that is formed of picturesand picture sequences may be reconstructed. The reconstructed video maybe reproduced by a reproducing apparatus, may be stored in a storagemedium, or may be transmitted via a network.

The one or more embodiments of the present disclosure may be written ascomputer programs and may be implemented in general-use digitalcomputers that execute the programs by using a non-transitorycomputer-readable recording medium. Examples of the non-transitorycomputer-readable recording medium include magnetic storage media (e.g.,ROM, floppy disks, hard disks, etc.), optical recording media (e.g.,CD-ROMs, or DVDs), etc.

For convenience of description, the video encoding methods and/or thevideo encoding method, which are described with reference to FIGS. 1Athrough 20 , will be collectively referred to as ‘the video encodingmethod of the present disclosure’. Also, the video decoding methodsand/or the video decoding method, which are described with reference toFIGS. 1A through 20 , will be collectively referred to as ‘the videodecoding method of the present disclosure’.

Also, a video encoding apparatus including the video encoding apparatus,the video encoding apparatus 800, or the video encoder 1100, which hasbeen described with reference to FIGS. 1A through 20 , will be referredto as a ‘video encoding apparatus of the present disclosure’. Inaddition, a video decoding apparatus including the video decodingapparatus 900 or the video decoder 1200, which has been descried withreference to FIGS. 1A through 20 , will be referred to as a ‘videodecoding apparatus of the present disclosure’.

A non-transitory computer-readable recording medium such as a disc 26000that stores the programs according to an embodiment will now bedescribed in detail.

FIG. 21 illustrates a physical structure of the disc 26000 in which aprogram is stored, according to an embodiment. The disc 26000, as astorage medium, may be a hard drive, a compact disc-read only memory(CD-ROM) disc, a Blu-ray disc, or a digital versatile disc (DVD). Thedisc 26000 includes a plurality of concentric tracks Tr that are eachdivided into a specific number of sectors Se in a circumferentialdirection of the disc 26000. In a specific region of the disc 26000, aprogram that executes the quantized parameter determining method, thevideo encoding method, and the video decoding method described above maybe assigned and stored.

A computer system embodied using a storage medium that stores a programfor executing the video encoding method and the video decoding method asdescribed above will now be described with reference to FIG. 22 .

FIG. 22 illustrates a disc drive 26800 for recording and reading aprogram by using the disc 26000. A computer system 26700 may store aprogram that executes at least one of the video encoding method and thevideo decoding method of the present disclosure, in the disc 26000 viathe disc drive 26800. In order to run the program stored in the disc26000 in the computer system 26700, the program may be read from thedisc 26000 and be transmitted to the computer system 26700 by using thedisc drive 26800.

The program that executes at least one of the video encoding method andthe video decoding method of the present disclosure may be stored notonly in the disc 26000 illustrated in FIGS. 21 and 22 but also in amemory card, a ROM cassette, or a solid state drive (SSD).

A system to which the video encoding method and the video decodingmethod described above are applied will be described below.

FIG. 23 illustrates a diagram of an overall structure of a contentsupply system 11000 for providing a content distribution service. Aservice area of a communication system is divided intopredetermined-sized cells, and wireless base stations 11700, 11800,11900, and 12000 are installed in these cells, respectively.

The content supply system 11000 includes a plurality of independentdevices. For example, the plurality of independent devices, such as acomputer 12100, a personal digital assistant (PDA) 12200, a video camera12300, and a mobile phone 12500, are connected to the Internet 11100 viaan internet service provider 11200, a communication network 11400, andthe wireless base stations 11700, 11800, 11900, and 12000.

However, the content supply system 11000 is not limited to asillustrated in FIG. 23 , and devices may be selectively connectedthereto. The plurality of independent devices may be directly connectedto the communication network 11400, not via the wireless base stations11700, 11800, 11900, and 12000.

The video camera 12300 is an imaging device, e.g., a digital videocamera, which is capable of capturing video images. The mobile phone12500 may employ at least one communication method from among variousprotocols, e.g., Personal Digital Communications (PDC), Code DivisionMultiple Access (CDMA), Wideband-Code Division Multiple Access (W-CDMA),Global System for Mobile Communications (GSM), and Personal HandyphoneSystem (PHS).

The video camera 12300 may be connected to a streaming server 11300 viathe wireless base station 11900 and the communication network 11400. Thestreaming server 11300 allows content received from a user via the videocamera 12300 to be streamed via a real-time broadcast. The contentreceived from the video camera 12300 may be encoded by the video camera12300 or the streaming server 11300. Video data captured by the videocamera 12300 may be transmitted to the streaming server 11300 via thecomputer 12100.

Video data captured by using a camera 12600 may also be transmitted tothe streaming server 11300 via the computer 12100. The camera 12600 isan imaging device capable of capturing both still images and videoimages, similar to a digital camera. The video data captured by usingthe camera 12600 may be encoded by using the camera 12600 or thecomputer 12100. Software that performs encoding and decoding video maybe stored in a non-transitory computer-readable recording medium, e.g.,a CD-ROM disc, a floppy disc, a hard disc drive, an SSD, or a memorycard, which may be accessed by the computer 12100.

If video data is captured by using a camera built in the mobile phone12500, the video data may be received from the mobile phone 12500.

The video data may also be encoded by a large scale integrated circuit(LSI) system installed in the video camera 12300, the mobile phone12500, or the camera 12600.

The content supply system 11000 may encode content data recorded by auser using the video camera 12300, the camera 12600, the mobile phone12500, or another imaging device, e.g., content recorded during aconcert, and transmit the encoded content data to the streaming server11300. The streaming server 11300 may transmit the encoded content datain a type of a streaming content to other clients that request thecontent data.

The clients are devices capable of decoding the encoded content data,e.g., the computer 12100, the PDA 12200, the video camera 12300, or themobile phone 12500. Thus, the content supply system 11000 allows theclients to receive and reproduce the encoded content data. Also, thecontent supply system 11000 allows the clients to receive the encodedcontent data and decode and reproduce the encoded content data in realtime, thereby enabling personal broadcasting.

Encoding and decoding operations of the plurality of independent devicesincluded in the content supply system 11000 may be similar to those of avideo encoding apparatus and a video decoding apparatus according toembodiments.

With reference to FIGS. 24 and 25 , the mobile phone 12500 included inthe content supply system 11000 according to an embodiment will now bedescribed in detail.

FIG. 24 illustrates an external structure of the mobile phone 12500 towhich the video encoding method and the video decoding method of thepresent disclosure are applied, according to an embodiment. The mobilephone 12500 may be a smart phone, the functions of which are not limitedand a large number of the functions of which may be changed or expanded.

The mobile phone 12500 includes an internal antenna 12510 via which aradio-frequency (RF) signal may be exchanged with the wireless basestation 12000, and includes a display screen 12520 for displaying imagescaptured by a camera 12530 or images that are received via the antenna12510 and decoded, e.g., a liquid crystal display (LCD) or an organiclight-emitting diode (OLED) screen. The mobile phone 12500 includes anoperation panel 12540 including a control button and a touch panel. Ifthe display screen 12520 is a touch screen, the operation panel 12540further includes a touch sensing panel of the display screen 12520. Themobile phone 12500 includes a speaker 12580 for outputting voice andsound or another type of a sound output unit, and a microphone 12550 forinputting voice and sound or another type of a sound input unit. Themobile phone 12500 further includes the camera 12530, such as acharge-coupled device (CCD) camera, to capture video and still images.The mobile phone 12500 may further include a storage medium 12570 forstoring encoded/decoded data, e.g., video or still images captured bythe camera 12530, received via email, or obtained according to variousways; and a slot 12560 via which the storage medium 12570 is loaded intothe mobile phone 12500. The storage medium 12570 may be a flash memory,e.g., a secure digital (SD) card or an electrically erasable andprogrammable read only memory (EEPROM) included in a plastic case.

FIG. 25 illustrates an internal structure of the mobile phone 12500. Inorder to systemically control parts of the mobile phone 12500 includingthe display screen 12520 and the operation panel 12540, a power supplycircuit 12700, an operation input controller 12640, an image encoder12720, a camera interface 12630, an LCD controller 12620, an imagedecoder 12690, a multiplexer/demultiplexer 12680, a recording/readingunit 12670, a modulation/demodulation unit 12660, and a sound processor12650 are connected to a central controller 12710 via a synchronizationbus 12730.

If a user operates a power button and sets from a ‘power off’ state to a‘power on’ state, the power supply circuit 12700 supplies power to allthe parts of the mobile phone 12500 from a battery pack, thereby settingthe mobile phone 12500 to an operation mode.

The central controller 12710 includes a central processing unit (CPU), aread-only memory (ROM), and a random access memory (RAM).

While the mobile phone 12500 transmits communication data to theoutside, a digital signal is generated by the mobile phone 12500 by thecontrol of the central controller 12710. For example, the soundprocessor 12650 may generate a digital sound signal, the video encoder12720 may generate a digital image signal, and text data of a messagemay be generated via the operation panel 12540 and the operation inputcontroller 12640. When a digital signal is transmitted to themodulation/demodulation unit 12660 by the control of the centralcontroller 12710, the modulation/demodulation unit 12660 modulates afrequency band of the digital signal, and a communication circuit 12610performs digital-to-analog conversion (DAC) and frequency conversion onthe frequency band-modulated digital sound signal. A transmission signaloutput from the communication circuit 12610 may be transmitted to avoice communication base station or the wireless base station 12000 viathe antenna 12510.

For example, when the mobile phone 12500 is in a conversation mode, asound signal obtained via the microphone 12550 is converted to a digitalsound signal by the sound processor 12650 by the control of the centralcontroller 12710. The generated digital sound signal may be converted toa transmission signal through the modulation/demodulation unit 12660 andthe communication circuit 12610, and may be transmitted via the antenna12510.

When a text message, e.g., email, is transmitted during a datacommunication mode, text data of the text message is input via theoperation panel 12540 and is transmitted to the central controller 12610via the operation input controller 12640. By the control of the centralcontroller 12610, the text data is transformed into a transmissionsignal via the modulation/demodulation unit 12660 and the communicationcircuit 12610 and is transmitted to the wireless base station 12000 viathe antenna 12510.

In order to transmit image data during the data communication mode,image data captured by the camera 12530 is provided to the image encoder12720 via the camera interface 12630. The captured image data may bedirectly displayed on the display screen 12520 via the camera interface12630 and the LCD controller 12620.

A structure of the image encoder 12720 may correspond to that of thevideo encoding apparatus 100 described above. The image encoder 12720may transform the image data received from the camera 12530 intocompressed and encoded image data according to the video encoding methodof the present disclosure, and then may output the encoded image data tothe multiplexer/demultiplexer 12680. During a recording operation of thecamera 12530, a sound signal obtained by the microphone 12550 of themobile phone 12500 may be transformed into digital sound data via thesound processor 12650, and the digital sound data may be transmitted tothe multiplexer/demultiplexer 12680.

The multiplexer/demultiplexer 12680 multiplexes the encoded image datareceived from the image encoder 12720, together with the sound datareceived from the sound processor 12650. A result of multiplexing thedata may be transformed into a transmission signal via themodulation/demodulation unit 12660 and the communication circuit 12610,and may then be transmitted via the antenna 12510.

While the mobile phone 12500 receives communication data from theoutside, frequency recovery and analog-to-digital conversion (ADC) areperformed on a signal received via the antenna 12510 to transform thesignal into a digital signal. The modulation/demodulation unit 12660modulates a frequency band of the digital signal. The frequency-bandmodulated digital signal is transmitted to the video decoder 12690, thesound processor 12650, or the LCD controller 12620, according to thetype of the digital signal.

During the conversation mode, the mobile phone 12500 amplifies a signalreceived via the antenna 12510, and obtains a digital sound signal byperforming frequency conversion and ADC on the amplified signal. Areceived digital sound signal is transformed into an analog sound signalvia the modulation/demodulation unit 12660 and the sound processor12650, and the analog sound signal is output via the speaker 12580 bythe control of the central controller 12710.

When during the data communication mode, data of a video file accessedat an Internet website is received, a signal received from the wirelessbase station 12000 via the antenna 12510 is output as multiplexed datavia the modulation/demodulation unit 12660, and the multiplexed data istransmitted to the multiplexer/demultiplexer 12680.

In order to decode the multiplexed data received via the antenna 12510,the multiplexer/demultiplexer 12680 demultiplexes the multiplexed datainto an encoded video data stream and an encoded audio data stream. Viathe synchronization bus 12730, the encoded video data stream and theencoded audio data stream are provided to the video decoder 12690 andthe sound processor 12650, respectively.

A structure of the image decoder 12690 may correspond to that of thevideo decoding apparatus described above. The image decoder 12690 maydecode the encoded video data so as to generate reconstructed video dataand provide the reconstructed video data to the display screen 12520 viathe LCD controller 12620, by using the aforementioned video decodingmethod according to the present embodiment.

Thus, the data of the video file accessed at the Internet website may bedisplayed on the display screen 12520. At the same time, the soundprocessor 12650 may transform audio data into an analog sound signal,and provide the analog sound signal to the speaker 12580. Thus, audiodata contained in the video file accessed at the Internet website mayalso be reproduced via the speaker 12580.

The mobile phone 12500 or another type of communication terminal may bea transceiving terminal including both the video encoding apparatus andthe video decoding apparatus of the present disclosure, may be atransceiving terminal including only the video encoding apparatus of thepresent disclosure, or may be a transceiving terminal including only thevideo decoding apparatus of the present disclosure.

A communication system according to an embodiment is not limited to thecommunication system described above with reference to FIG. 24 . Forexample, FIG. 26 illustrates a digital broadcasting system employing acommunication system, according to an embodiment.

The digital broadcasting system of FIG. 26 according to an embodimentmay receive a digital broadcast transmitted via a satellite or aterrestrial network by using the video encoding apparatus and the videodecoding apparatus of the present disclosure.

In more detail, a broadcasting station 12890 transmits a video datastream to a communication satellite or a broadcasting satellite 12900 byusing radio waves. The broadcasting satellite 12900 transmits abroadcast signal, and the broadcast signal is transmitted to a satellitebroadcast receiver via a household antenna 12860. In every house, anencoded video stream may be decoded and reproduced by a TV receiver12810, a set-top box 12870, or another device.

When the video decoding apparatus according to the present embodiment isimplemented in a reproducing apparatus 12830, the reproducing apparatus12830 may parse and decode an encoded video stream recorded on a storagemedium 12820, such as a disc or a memory card to reconstruct digitalsignals. Thus, the reconstructed video signal may be reproduced, forexample, on a monitor 12840.

In the set-top box 12870 connected to the antenna 12860 for asatellite/terrestrial broadcast or a cable antenna 12850 for receiving acable television (TV) broadcast, the video decoding apparatus of thepresent disclosure may be installed. Data output from the set-top box12870 may also be reproduced on a TV monitor 12880.

As another example, the video decoding apparatus according to thepresent embodiment may be installed in the TV receiver 12810 instead ofthe set-top box 12870.

An automobile 12220 that has an appropriate antenna 12210 may receive asignal transmitted from the satellite 12200 or the wireless base station11700. A decoded video may be reproduced on a display screen of anautomobile navigation system 12930 installed in the automobile 12920.

A video signal may be encoded by the video encoding apparatus of thepresent disclosure and may then be recorded to and stored in a storagemedium. In more detail, an image signal may be stored in a DVD disc12960 by a DVD recorder or may be stored in a hard disc by a hard discrecorder 12950. As another example, the video signal may be stored in anSD card 12970. If the hard disc recorder 12950 includes the videodecoding apparatus according to the present embodiment, a video signalrecorded on the DVD disc 12960, the SD card 12970, or another storagemedium may be reproduced on the TV monitor 12880.

The automobile navigation system 12930 may not include the camera 12530,the camera interface 12630, and the video encoder 12720 of FIG. 26 . Forexample, the computer 12100 and the TV receiver 12810 may not includethe camera 12530, the camera interface 12630, and the video encoder12720 of FIG. 26 .

FIG. 27 illustrates a network structure of a cloud computing systemusing the video encoding apparatus and the video decoding apparatus,according to an embodiment.

The cloud computing system may include a cloud computing server 14100, auser database (DB) 14100, a plurality of computing resources 14200, anda user terminal.

The cloud computing system provides an on-demand outsourcing service ofthe plurality of computing resources 14200 via a data communicationnetwork, e.g., the Internet, in response to a request from the userterminal. Under a cloud computing environment, a service providerprovides users with desired services by combining computing resources atdata centers located at physically different locations by usingvirtualization technology. A service user does not have to installcomputing resources, e.g., an application, a storage, an operatingsystem (OS), and security software, into his/her own terminal in orderto use them, but may select and use desired services from among servicesin a virtual space generated through the virtualization technology, at adesired point in time.

A user terminal of a specified service user is connected to the cloudcomputing server 14000 via a data communication network including theInternet and a mobile telecommunication network. User terminals may beprovided cloud computing services, and particularly video reproductionservices, from the cloud computing server 14000. The user terminals maybe various types of electronic devices capable of being connected to theInternet, e.g., a desktop PC 14300, a smart TV 14400, a smart phone14500, a notebook computer 14600, a portable multimedia player (PMP)14700, a tablet PC 14800, and the like.

The cloud computing server 14100 may combine the plurality of computingresources 14200 distributed in a cloud network and provide userterminals with a result of combining. The plurality of computingresources 14200 may include various data services, and may include datauploaded from user terminals. As described above, the cloud computingserver 14100 may provide user terminals with desired services bycombining video database distributed in different regions according tothe virtualization technology.

User information about users who have subscribed for a cloud computingservice is stored in the user DB 14100. The user information may includelogging information, addresses, names, and personal credit informationof the users. The user information may further include indexes ofvideos. Here, the indexes may include a list of videos that have alreadybeen reproduced, a list of videos that are being reproduced, a pausingpoint of a video that was being reproduced, and the like.

Information about a video stored in the user DB 14100 may be sharedbetween user devices. For example, when a video service is provided tothe notebook computer 14600 in response to a request from the notebookcomputer 14600, a reproduction history of the video service is stored inthe user DB 14100. When a request to reproduce the video service isreceived from the smart phone 14500, the cloud computing server 14000searches for and reproduces the video service, based on the user DB14100. When the smart phone 14500 receives a video data stream from thecloud computing server 14000, a process of reproducing video by decodingthe video data stream is similar to an operation of the mobile phone12500 described above with reference to FIG. 24 .

The cloud computing server 14000 may refer to a reproduction history ofa desired video service, stored in the user DB 14100. For example, thecloud computing server 14000 receives a request to reproduce a videostored in the user DB 14100, from a user terminal. If this video wasbeing reproduced, then a method of streaming this video, performed bythe cloud computing server 14000, may vary according to the request fromthe user terminal, i.e., according to whether the video will bereproduced, starting from a start thereof or a pausing point thereof.For example, if the user terminal requests to reproduce the video,starting from the start thereof, the cloud computing server 14000transmits streaming data of the video starting from a first framethereof to the user terminal. If the user terminal requests to reproducethe video, starting from the pausing point thereof, the cloud computingserver 14000 transmits streaming data of the video starting from a framecorresponding to the pausing point, to the user terminal.

In this case, the user terminal may include the video decoding apparatusof the present disclosure as described above with reference to FIGS. 1Athrough 20 . As another example, the user terminal may include the videoencoding apparatus of the present disclosure as described above withreference to FIGS. 1A through 20 . Alternatively, the user terminal mayinclude both the video decoding apparatus and the video encodingapparatus of the present disclosure as described above with reference toFIGS. 1A through 20 .

Various applications of the video encoding method, the video decodingmethod, the video encoding apparatus, and the video decoding apparatusaccording to embodiments described above with reference to FIGS. 1Athrough 20 are described above with reference to FIGS. 21 through 27 .However, embodiments with respect to methods of storing the videoencoding method and the video decoding method in a storage medium ormethods of implementing the video encoding apparatus and the videodecoding apparatus in a device according to various embodimentsdescribed above with reference to FIGS. 1A through 20 are not limited toembodiments described above with reference to FIGS. 21 through 27 .

The resulting method, process, apparatus, product, and/or system isstraightforward, cost-effective, uncomplicated, highly versatile, andaccurate. Also, the process, apparatus, product, and system may beimplemented by adapting known components for ready, efficient, andeconomical manufacturing, application, and utilization. Anotherimportant aspect of the present disclosure is that it valuably supportsand services the historical trend of reducing costs, simplifyingsystems, and increasing performance. These and other valuable aspects ofan embodiment of the inventive concept consequently further the state ofthe technology to at least the next level.

While the invention has been described in conjunction with a specificbest mode, it is to be understood that many alternatives, modifications,and variations will be apparent to those skilled in the art in light ofthe foregoing description. That is, it is intended to embrace all suchalternatives, modifications, and variations that fall within the scopeof the included claims. All matters set forth herein or shown in theaccompanying drawings are to be interpreted in an illustrative andnon-limiting sense. The resulting method, process, apparatus, product,and/or system is straightforward, cost-effective, uncomplicated, highlyversatile, and accurate. Also, the process, apparatus, product, andsystem may be implemented by adapting known components for ready,efficient, and economical manufacturing, application, and utilization.Another important aspect of the present disclosure is that it valuablysupports and services the historical trend of reducing costs,simplifying systems, and increasing performance. These and othervaluable aspects of an embodiment of the inventive concept consequentlyfurther the state of the technology to at least the next level.

While the invention has been described in conjunction with a specificbest mode, it is to be understood that many alternatives, modifications,and variations will be apparent to those skilled in the art in light ofthe foregoing description. That is, it is intended to embrace all suchalternatives, modifications, and variations that fall within the scopeof the included claims. All matters set forth herein or shown in theaccompanying drawings are to be interpreted in an illustrative andnon-limiting sense.

What is claimed is:
 1. A method for decoding a motion vector, the methodcomprising: obtaining a motion vector predictor of a current block and aresidual motion vector of the current block; obtaining a shift-value forthe residual motion vector, the shift-value corresponding to aresolution of the residual motion vector of the current block;up-scaling the residual motion vector by performing left-shift using theshift-value; and reconstructing a motion vector of the current blockbased on the up-scaled residual motion vector and the motion vectorpredictor, wherein the shift-value is one of integer values including ashift-value equal to 0 and at least one shift-value greater than 0,wherein the current block is obtained by splitting an upper block.
 2. Amethod for encoding a motion vector, the method comprising: determininga resolution for encoding a residual motion vector of a current block;obtaining a shift-value for the residual motion vector, the shift-valuecorresponding to the determined resolution; obtaining a motion vectorpredictor of the current block; obtaining the residual motion vectorbased on a motion vector of the current block and the motion vectorpredictor of the current block; down-scaling the residual motion vectorby performing right-shift using the shift-value; and encoding thedown-scaled residual motion vector, wherein the shift-value is one ofinteger values including a shift-value equal to 0 and at least oneshift-value greater than 0, wherein the current block is obtained bysplitting an upper block.
 3. A non-transitory computer-readable mediumfor recording a bitstream, the bitstream comprising: an encodeddown-scaled residual motion vector, wherein the encoded down-scaledresidual motion vector is obtained by: determining a resolution forencoding a residual motion vector of a current block; obtaining ashift-value for the residual motion vector, the shift-valuecorresponding to the determined resolution; obtaining a motion vectorpredictor of the current block; obtaining the residual motion vectorbased on a motion vector of the current block and the motion vectorpredictor of the current block; and down-scaling the residual motionvector by performing right-shift using the shift-value; and encoding thedown-scaled residual motion vector, wherein the shift-value is one ofinteger values including a shift-value equal to 0 and at least oneshift-value greater than 0, wherein the current block is obtained bysplitting an upper block.